Skip to content

Install the codex CLI into codex task images (M3.4: the codex base variant) - #388

Merged
tildesrc merged 1 commit into
mainfrom
panopticon/codex-base-image
Aug 24, 2026
Merged

Install the codex CLI into codex task images (M3.4: the codex base variant)#388
tildesrc merged 1 commit into
mainfrom
panopticon/codex-base-image

Conversation

@tildesrc

Copy link
Copy Markdown
Contributor

Why

build_base(agent_cli="codex") built the same claude-only Dockerfile and merely re-tagged it panopticon-base-codex, so no codex task container had a codex binary — every codex task failed at launch. This wires the missing per-CLI base tier that ADR 0014 §4 committed to, closing the dropped M3.4 slice.

What

  • Parameterize the bundled Dockerfile with an AGENT_CLI build arg (claude default, or codex). Each CLI's install is gated on the arg, so one Dockerfile yields two genuinely different panopticon-base-<cli> images that carry exactly their own runtime.
  • Install codex as the statically-linked musl binary straight from GitHub releases (no node/npm), pinned via a CODEX_VERSION arg (0.144.4 — the release the codex adapter's behavior is verified against), with an arch switch for x86_64/aarch64, landing at /usr/local/bin/codex (0755, world-executable so the dropped panopticon user can exec it).
  • images.py passes --build-arg AGENT_CLI=<cli> from the resolved CLI in both build_base and build_base_if_missing (factored into one _build_base helper). CODEX_VERSION stays host-side in the Dockerfile, honoring the rule that the runner never imports the container package.
  • make build grows a per-CLI loop (AGENT_CLIS ?= claude codex), building both bases by default.
  • Fix the codex primary model tier to gpt-5.6-sol (verified against the pinned release), replacing the earlier unverified gpt-5.6-codex guess.

Design choice: this follows ADR 0014 §4's committed base-variant approach (panopticon-base-<cli>), not the reference repo's CLI-image-tier — the base infrastructure (base_image(cli), per-CLI tag/mount) already exists here, and the tier approach would need an ADR amendment.

…riant)

`build_base(agent_cli="codex")` built the same claude-only Dockerfile and merely
re-tagged it `panopticon-base-codex`, so no codex task container had a `codex`
binary and every codex task failed at launch. This wires the missing base tier
(ADR 0014 §4).

- Parameterize the bundled Dockerfile with an `AGENT_CLI` build arg (`claude`
  default, or `codex`): only the selected CLI is installed, so one Dockerfile
  yields two genuinely different `panopticon-base-<cli>` images.
- Install codex as the statically-linked musl binary from GitHub releases (no
  node/npm), pinned via a `CODEX_VERSION` arg (0.144.4), with an arch switch for
  x86_64/aarch64, to `/usr/local/bin/codex` (0755, world-executable).
- `images.py` passes `--build-arg AGENT_CLI=<cli>` from the resolved CLI in both
  `build_base` and `build_base_if_missing` (factored into one helper).
- `make build` grows a per-CLI loop (`AGENT_CLIS`), building both bases by default.
- Fix the codex `primary` model tier: `gpt-5.6-sol` (verified against the pinned
  release), not the earlier unverified `gpt-5.6-codex` guess.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tildesrc
tildesrc merged commit 4b61825 into main Aug 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants