feat: install the latest standalone Codex in dev containers - #19
Merged
Conversation
- build from the Ubuntu 24.04 devcontainer base image - verify and install the standalone Codex 0.121.0 release for amd64 and arm64 - import AGENTS.md from a regular CLAUDE.md file
- make Copier render HEAD instead of the latest release tag - ensure pull request changes are included in generated project checks
- persist the uv cache in a dedicated named volume - share Claude and Codex host directories without redundant nested mounts
Grant the vscode user write access before dependency synchronization. Keep the persistent uv cache usable on first container creation.
Initialize the parent cache directory ownership before dependency synchronization. Allow pre-commit to create its cache beside the mounted uv cache.
- replace pinned release assets with the official standalone installer - resolve the latest stable Codex version during image builds
- consolidate apt packages with the Codex installation layer - cache apt metadata and packages with locked BuildKit mounts - remove the redundant third-party apt packages Feature
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview and Background
This PR modernizes the generated development container by installing the latest stable standalone Codex CLI and by letting Claude Code load the shared agent instructions. Root CI previously rendered the latest template tag instead of the pull request revision, so unreleased template changes were not exercised.
Related Issues
None.
Implementation Approach
Build from the official
mcr.microsoft.com/devcontainers/base:ubuntu-24.04image because Python remains managed by uv for the selected template version. Run the installer published with the latest OpenAI Codex release during image builds, storing the standalone package under/opt/codexand exposingcodexthrough/usr/local/bin. This avoids retaining Node.js solely for Codex and removes the previous Codex version pin.Install the required Ubuntu packages in the same Dockerfile instead of delegating them to a third-party Feature. Locked BuildKit cache mounts preserve apt metadata and downloaded packages across builds.
Replace the Claude symlink with a regular import file because Claude's instruction import syntax requires
@AGENTS.mdas file content.Keep tool caches separate from host credentials. The uv cache uses a project-specific named volume, while the host
.claudeand.codexdirectories remain read-write bind mounts so their configuration and file-backed authentication can be reused without redundant nested file mounts.Copier now receives
--vcs-ref HEADin root CI so the generated test project represents the revision under test rather than the latest release tag.Sources:
Changes
CLAUDE.mdas a regular file importingAGENTS.md.Impact
Newly generated projects and projects applying this Copier update resolve the latest stable Codex CLI when the Codex installation layer is built. Codex can therefore change between uncached image builds without a template change. Ubuntu package installation no longer depends on the
rocker-orgFeature. Python selection remains controlled by uv, and the existing Claude Code feature remains unchanged. The generated container has read-write access to the host.claudeand.codexdirectories, matching the existing credential-sharing behavior.Validation Results
codex --versionas the non-rootvscodeuser and receivedcodex-cli 0.152.1.wget,git,jq, GCC,rg, andfdfindare available to the non-root user.CLAUDE.mdcontains exactly@AGENTS.mdand is not a symlink.actionlintand checked the Git diff for whitespace errors.