Skip to content

fix(cross-model): launch codex peers on codex-acp 2.x - #2109

Open
SomSamantray wants to merge 4 commits into
EveryInc:mainfrom
SomSamantray:fix/codex-adapter-2x
Open

SomSamantray wants to merge 4 commits into
EveryInc:mainfrom
SomSamantray:fix/codex-adapter-2x

Conversation

@SomSamantray

@SomSamantray SomSamantray commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

acpx 0.22.0 and 0.23.0 both pin @agentclientprotocol/codex-acp@^1.1.5. That adapter's bundled Codex core is refused by the Codex service for every gpt-6.1/gpt-6.2 model (model_not_in_accessible_catalog), including the peer's default gpt-6.1-terra, so the codex route failed before egress on current accounts. Only gpt-6-* models answered.

On macOS and Linux this launches the reporter-verified codex-acp 2.12.0 explicitly through acpx's --agent, in the shared transport block every cross-model worker already duplicates. CODEX_PATH still points the adapter at the installed CLI, and the same npx/npm policy applies to the adapter as to acpx itself.

Fixes #2098.

Changes

  • skills/{ce-work,ce-pov,ce-doc-review,ce-code-review}/scripts/cross-model-*.sh: the codex branch of acpx_agent_argv passes --agent "npx -y @agentclientprotocol/codex-acp@2.12.0" instead of acpx's built-in codex launch. The block stays byte-identical across the four workers; the parity test pins the launch and derives setup's warm spec from it.
  • Native Windows keeps acpx's built-in launch, because acpx rejects a raw --agent command there.
  • skills/ce-setup/scripts/check-health warms the pinned adapter alongside the acpx-bundled ones; its test now expects all of them.
  • The four cross-model guides and the setup warm reference state the adapter the codex route runs, scoped to POSIX hosts.

Validation

  • bun test tests/acpx-transport-parity.test.ts: 4 pass. bun test tests/skills/ce-setup-check-health.test.ts: 117 pass. bun run test:skill-guards: 963 pass. bash -n on all four scripts.
  • bun run test --changed-since=ee3695a24ae1ccb205e4334b79799cb25c060247 before the review follow-ups: 4942 pass, 18 skip, 0 fail across 190 files. The follow-ups changed tests, one setup script, and docs; the targeted suites above re-ran green, and PR CI is the gate for the final head.
  • The argv is verified through --emit-adapter codex. No live Codex peer run was possible here: the Codex CLI failed token refresh (401). The issue reporter verified 2.12.0 end to end.

Known limitation (native Windows)

The Windows branch intentionally keeps acpx's built-in 1.x adapter, so gpt-6.1/gpt-6.2 peers remain unavailable there. That is not a regression (the route already failed for those models), and the guides now say so instead of claiming the 2.x launch everywhere.

Unapplied review findings

  • P2 — skills/*/scripts/cross-model-*.sh — acpx_config_guard still refuses the codex route when ~/.acpx/config.json or .acpxrc.json holds an agents.codex entry, although the POSIX launch no longer uses acpx's built-in agent, so the entry is inert. Kept fail-closed because exempting it needs a live acpx repro; a user with a stale workaround entry can remove it. Suggested fix: skip the guard for codex on non-Windows hosts and repoint the three override tests at a built-in route.

Security Disclosure

This replaces one pinned npm adapter launch with another: @agentclientprotocol/codex-acp@2.12.0 is pinned exactly (not a range) and starts through the same npx, environment, sandbox, and permission flags acpx used for its registry launch. No new credentials, network destinations, or shell input handling.

Agent Disclosure

  • Tool: DeepSeek Harness

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T07:38:38.347727Z 62c2e8a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90354101fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

case "$1" in
# acpx pins codex-acp 1.x, whose bundled core the service refuses for every
# gpt-6.1/6.2 model; launch the 2.x adapter that serves them (#2098).
codex) printf '%s\0' --agent "npx -y @agentclientprotocol/codex-acp@2.12.0" exec ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Codex off acpx's raw --agent path on Windows

On a native Windows host with a Codex CLI and no .acpx override, this uses the raw --agent invocation even though the existing acpx_preflight text for OpenCode says acpx rejects on native Windows; Codex has no matching platform guard, so its peer cannot start in any of the four worker scripts. Preserve the built-in Codex agent on Windows or reject this route before launch.

AGENTS.md reference: AGENTS.md:L127-L127

Useful? React with 👍 / 👎.

acpx 0.22.0 and 0.23.0 both pin codex-acp ^1.1.5, whose bundled core the
Codex service refuses for every gpt-6.1/6.2 model, including the default
gpt-6.1-terra. The codex route therefore failed or was refused before
egress on current accounts.

Launch the reporter-verified codex-acp 2.12.0 explicitly through acpx's
--agent, in the shared transport block of all four cross-model workers.
The parity test pins the launch, and the route tests assert the emitted
argv; the cross-model guides state the adapter the codex route runs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3e2793a6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/guides/ce-setup.md Outdated
- Offers, in one question, to draft or update `CODING_STANDARDS.md` and `REVIEW.md` from your recent pull requests, plus a line in your agent-instructions file pointing agents to each. See [Review docs](#review-docs).
- Repairs an invalid CE Work implementation-engine block in the config layer that supplied the bad value.
- Offers to warm the npm cache for cross-model peers when Node 22.13 or newer and `npx` are present. On approval it downloads an eligible acpx version from the supported range and the codex and claude adapters associated with its upper bound without starting them (npm still runs any install scripts they declare, as a first peer run would), reducing first-run downloads in `ce-pov`, `ce-doc-review`, `ce-code-review`, and `ce-work`; an older policy-selected acpx release may fetch different adapter packages. Declining fetches nothing; the first peer run downloads them instead.
- Offers to warm the npm cache for cross-model peers when Node 22.13 or newer and `npx` are present. On approval it downloads an eligible acpx version from the supported range the claude adapter associated with its upper bound, and the codex-acp 2.12.0 adapter the codex route pins, without starting them (npm still runs any install scripts they declare, as a first peer run would), reducing first-run downloads in `ce-pov`, `ce-doc-review`, `ce-code-review`, and `ce-work`; an older policy-selected acpx release may fetch different adapter packages. Declining fetches nothing; the first peer run downloads them instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Warm the Codex adapter version used by the route

When a user accepts this cache-warm offer without already having 2.12.0 cached, check-health still iterates ACPX_ADAPTER_SPECS containing @agentclientprotocol/codex-acp@^1.1.5, while the worker launch pins @agentclientprotocol/codex-acp@2.12.0. The warm therefore does not pre-cache the adapter the Codex route uses, so the first peer run still has to download it. Update the warm package list with the pinned version so this opt-in setup step primes the new route.

AGENTS.md reference: AGENTS.md:L127-L127

Useful? React with 👍 / 👎.

…nned adapter

Two review findings on the codex-acp 2.x change:

- acpx rejects a raw --agent launch on native Windows, so the codex route
  keeps acpx's built-in launch there instead of losing the peer.
- setup's cache warm now fetches the 2.12.0 adapter the route launches,
  with a parity test deriving the warm spec from the transport block.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc3f0a1bd3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# from its working directory's node_modules and .npmrc first.
warm_dir="$(mktemp -d "${TMPDIR:-/tmp}/ce-acpx-warm-XXXXXX")" || { warn "Cannot warm the npm cache: no temporary directory"; echo ""; exit 1; }
for spec in "acpx@>=$ACPX_MIN_VERSION <=$ACPX_VERSION" $ACPX_ADAPTER_SPECS; do
for spec in "acpx@>=$ACPX_MIN_VERSION <=$ACPX_VERSION" $ACPX_ADAPTER_SPECS $CODEX_PEER_ADAPTER_SPEC; do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the cache-warm test for the added adapter

--warm-acpx now issues an extra request for CODEX_PEER_ADAPTER_SPEC, but tests/skills/ce-setup-check-health.test.ts still builds the expected calls from only ACPX_ADAPTER_SPECS; the targeted warm-cache test fails with the unexpected @agentclientprotocol/codex-acp@2.12.0 invocation. Add the new pin to that expectation so the selected setup test passes.

AGENTS.md reference: AGENTS.md:L41-L41

Useful? React with 👍 / 👎.

Comment thread docs/guides/ce-code-review.md Outdated
### Requirements and trust boundary

Peers run through [acpx](https://github.com/openclaw/acpx), which talks to each agent CLI over the Agent Client Protocol. It needs Node 22.13 or newer with `npx`, `jq`, and the peer's own CLI. On native Windows, OpenCode and Pi are reported unavailable, because they cannot be launched there yet. npm selects the newest acpx release from the tested compatibility range that satisfies its `min-release-age`/`before` policy. The range starts at 0.18.0, which fixes unsafe read-approval handling in older releases, and stops at the newest validated release. If none qualifies, the peer is unavailable; npm policy is never relaxed. Downloads are reused from the npm cache. Resolution failures receive one metadata refresh without changing npm policy. If npm still reports a date cutoff, the worker names the `min-release-age`/`before` settings to check. When a prerequisite is missing, that peer is reported as not run and nothing is sent.
Peers run through [acpx](https://github.com/openclaw/acpx), which talks to each agent CLI over the Agent Client Protocol. It needs Node 22.13 or newer with `npx`, `jq`, and the peer's own CLI. On native Windows, OpenCode and Pi are reported unavailable, because they cannot be launched there yet. npm selects the newest acpx release from the tested compatibility range that satisfies its `min-release-age`/`before` policy. The range starts at 0.18.0, which fixes unsafe read-approval handling in older releases, and stops at the newest validated release. If none qualifies, the peer is unavailable; npm policy is never relaxed. Downloads are reused from the npm cache. Resolution failures receive one metadata refresh without changing npm policy. If npm still reports a date cutoff, the worker names the `min-release-age`/`before` settings to check. When a prerequisite is missing, that peer is reported as not run and nothing is sent. A codex peer launches `codex-acp` 2.12.0 directly through `--agent`, because the 1.x adapter acpx pins is refused by the Codex service for current models.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify the Codex adapter claim on native Windows

On native Windows without an .acpx override, each updated worker takes the MINGW*|MSYS*|CYGWIN* branch and emits its built-in codex route instead of the --agent npx -y @agentclientprotocol/codex-acp@2.12.0 command, so this new sentence overstates the route actually launched on that host; the same claim appears in the other three updated guides. The fresh evidence in this commit is this unqualified claim conflicting with the new platform branch. Qualify the Windows exception or add a Windows-compatible 2.x launch path.

AGENTS.md reference: AGENTS.md:L82-L82

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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.

Codex cross-model peer: acpx pins codex-acp 1.x, whose old Codex core is refused every gpt-6.1/6.2 model

1 participant