fix(codex): swap to @agentclientprotocol/codex-acp 1.x + detect outdated adapter#1750
Open
wpfleger96 wants to merge 1 commit into
Open
fix(codex): swap to @agentclientprotocol/codex-acp 1.x + detect outdated adapter#1750wpfleger96 wants to merge 1 commit into
wpfleger96 wants to merge 1 commit into
Conversation
3bf4ada to
e112622
Compare
30e8ac1 to
c276da5
Compare
…ted adapter The @zed-industries/codex-acp package is deprecated (0.16.0, frozen 2026-06-08); its README redirects to @agentclientprotocol/codex-acp (1.1.2, 2026-07-09). The 1.x adapter changed config injection: the old adapter accepted `-c key=value` CLI args; the 1.x arg dispatch only handles `--version`, `login`, and `cli` — all other args fall through to startAcpServer(), which reads config exclusively from `process.env["CODEX_CONFIG"]` (a JSON blob). Our three `-c` flags were silently dropped, breaking relay connectivity (buzz-cli MCP subprocess blocked by the Seatbelt sandbox). `network_proxy.mode` and `network_proxy.domains` are gone from the 1.x schema; only `sandbox_workspace_write.network_access` is needed. Without a version gate, users with the old 0.16.x adapter still on PATH would see it as Available, receive the new CODEX_CONFIG spawn contract, and get silently broken relay connectivity (0.16.x reads -c args, ignores env vars). Added AdapterOutdated: version-probe (codex-acp --version) in discover_acp_runtimes and cli_login_requirements blocks the old adapter and surfaces the reinstall nudge. Note: #1745's config-parse classifier keys on codex's `error loading configuration` + `unknown variant` stderr wording. 1.x bundles @openai/codex@0.144.0; the wording comes from that layer. Likely unchanged, noted as a dependency, not fixed here. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
c276da5 to
3e6c6cb
Compare
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.
Swaps the Codex ACP adapter from the deprecated
@zed-industries/codex-acp(0.16.0, frozen 2026-06-08) to@agentclientprotocol/codex-acp(1.1.2). Fixes relay connectivity breakage introduced by the spawn-contract change in the new adapter, detects users still on the old adapter, and correctly merges per-persona and operatorCODEX_CONFIGvalues without widening the sandbox for non-Codex agents.What changed
Package swap (
discovery.rs,README.md):@zed-industries/codex-acp→@agentclientprotocol/codex-acpacross all discovery, install hints, and docs.Network config injection (
config.rs): The 1.x adapter reads config exclusively fromCODEX_CONFIGenv (JSON blob) — the old-c key=valueCLI args are silently dropped.codex_network_args(Vec of-cflags) is replaced withcodex_network_envwhich injectsCODEX_CONFIG={"sandbox_workspace_write":{"network_access":true}}viapersona_env_vars.Configgainshas_generated_codex_config: boolset when injection succeeds, used downstream to gate the merge path.CODEX_CONFIG merge (
acp.rs):build_codex_config_envreplaces the old flat-spread with a recursivedeep_merge(overlay wins on scalar/shape collisions, recurses on object+object so unrelated nested keys survive). The merge +network_access=trueforcing only runs whenhas_generated_codex_configis true — persona-onlyCODEX_CONFIGvalues are never widened.AcpClient::spawnand all respawn paths thread the bool through.AdapterOutdated detection (
discovery.rs,readiness.rs,types.rs,setup_mode.rs, FE types + UI): Bothdiscover_acp_runtimesandcli_login_requirementsprobe the codex binary version and returnAdapterOutdatedwhen < 1.0. The reinstall UI (SetupStep.tsx,DoctorSettingsPanel.tsx) shows a targeted nudge.configNudge.tsincludesadapter_outdatedas a valid requirement.Stdout probe fix (
discovery.rs): Replaced the non-blocking pipe read with atempfileredirect to avoidO_NONBLOCK/ Windows incompatibility inprobe_codex_acp_major_version.Install-plan seam (
commands/agent_discovery.rs): Extracted pureplan_adapter_installfor testable outcomes without real npm.File-size gate (
check-file-sizes.mjs): Ratcheteddiscovery.rsceiling to 810 with justification comment.