Repository navigation
fix(codex): point codex-acp at the global codex CLI via CODEX_PATH - #1616
Open
chaodu-agent wants to merge 1 commit into
Open
chaodu-agent wants to merge 1 commit into
chaodu-agent wants to merge 1 commit into
Conversation
codex-acp 2.0.0 depends on @openai/codex ^0.158.0, so npm nests a 0.158.0 copy under codex-acp and spawns it when CODEX_PATH is unset. Set CODEX_PATH to the global codex bin (/usr/local/bin/codex, the npm global bin of the node base image) in the codex stage of Dockerfile.unified, Dockerfile.codex and Dockerfile.package. Not built or run in this commit.
This branch has not been deployed
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 free
to 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.
Fixes #1611
Root cause
@agentclientprotocol/codex-acp@2.0.0depends on@openai/codex^0.158.0. When the image installs@openai/codex@0.166.0globally, npm nests a separate@openai/codex@0.158.0undercodex-acp.codex-acpuses that nested copy unlessCODEX_PATHis set, so the agent runs an older CLI than the one the image installs.Change
Each of the three Dockerfiles that install the codex stack gets one line after the
npm install -gstep:Dockerfile.codexDockerfile.package(codexstage)Dockerfile.unified(codexstage)No other files change.
Verification
Run by a previous step on macmini (arm64):
codextarget builds, exit 0.codex --versionprints0.166.0.CODEX_PATHresolves to the 0.166.0 CLI at/usr/local/bin/codex.Review Contract
Goal
codex-acpin the OpenAB codex images must run the global@openai/codexCLI that the image installs (0.166.0), not the older copy npm nests undercodex-acp.Non-goals
CODEX_ACP_VERSIONorCODEX_VERSIONvalues.overridesin a package manifest.docs/codex.md. That file still states a dedup claim that is wrong. Fixing it is out of scope here.Accepted Residual Risks
ENVline with the same content on each architecture, so the risk is low, but it has not been observed on x86_64.CODEX_ACP_VERSION. Recovery: revert the three lines.CODEX_PATHis missing from an image, codex-acp falls back to the nested copy. That is the behavior before this PR, so no new failure mode is added.Acceptance Criteria
ENV CODEX_PATH=/usr/local/bin/codexin its codex stage, and the diff againstorigin/mainhas no other changes.codex --versionreports0.166.0, andCODEX_PATHresolves to that binary.Follow-ups
CODEX_VERSION.docs/codex.md.