Skip to content

chore: switch codex adapter to agentclientprotocol#336

Merged
osolmaz merged 2 commits into
openclaw:mainfrom
dutifulbob:chore/agentclientprotocol-codex-acp
May 21, 2026
Merged

chore: switch codex adapter to agentclientprotocol#336
osolmaz merged 2 commits into
openclaw:mainfrom
dutifulbob:chore/agentclientprotocol-codex-acp

Conversation

@dutifulbob
Copy link
Copy Markdown
Contributor

@dutifulbob dutifulbob commented May 21, 2026

Summary

ACPX still used the Zed Codex ACP adapter as its built-in Codex backend.
This changes the built-in Codex command to the Agent Client Protocol package and updates the matching docs, tests, and local agent guidance.
It also bumps the built-in Claude ACP adapter range to the latest published @agentclientprotocol/claude-agent-acp package.

What Changed

The built-in codex registry entry now resolves to the Agent Client Protocol package.
Codex model selection is documented as normal ACP model selection through advertised model ids and session/set_model.
The built-in claude registry entry now resolves to the current Claude ACP adapter range.

  • Switched src/agent-registry.ts to npx -y @agentclientprotocol/codex-acp@^0.0.44.
  • Bumped @agentclientprotocol/claude-agent-acp from ^0.31.0 to ^0.36.1.
  • Updated registry tests and client tests for the new package names and ranges.
  • Limited the old Codex thought_level -> reasoning_effort alias to legacy @zed-industries/codex-acp commands.
  • Updated README, agent docs, CLI docs, conformance docs, security routing, changelog, and the acpx skill docs.
  • Updated the persisted-key casing lint fixture to use the current built-in command.

Verification

The normal code and docs gates pass, and the published Codex adapter starts successfully through the new default command.
I also ran a real authenticated one-shot Codex message through the published adapter and got the expected response.
The published Claude adapter package at 0.36.1 resolves and starts from its package binary.

  • pnpm run check
  • pnpm run check:docs
  • pnpm run build:test && node --test dist-test/test/agent-registry.test.js
  • npm view @agentclientprotocol/claude-agent-acp version time --json
  • npx -y --package @agentclientprotocol/codex-acp@0.0.44 codex-acp --version
  • timeout 15s npx -y --package @agentclientprotocol/claude-agent-acp@0.36.1 claude-agent-acp --help
  • pnpm run conformance:run -- --case acp.v1.initialize.handshake --agent-command "npx -y @agentclientprotocol/codex-acp@0.0.44" --cwd /tmp/acpx-codex-conformance
  • HOME=/tmp/acpx-codex-default-home CODEX_HOME=/tmp/acpx-codex-default-home ACPX_HOME=/tmp/acpx-codex-default-acpx timeout 30s node dist/cli.js --cwd /tmp/acpx-codex-default-work --auth-policy fail --format json codex sessions new
  • timeout 120s node dist/cli.js --agent "npx -y @agentclientprotocol/codex-acp@0.0.44" --cwd /tmp/acpx-codex-message --approve-all --format quiet exec "Reply with exactly acpx-codex-ok and nothing else."

Behavior addressed: default acpx codex now launches @agentclientprotocol/codex-acp instead of @zed-industries/codex-acp, and default acpx claude now launches @agentclientprotocol/claude-agent-acp@^0.36.1.
Real environment tested: local Linux checkout with the published @agentclientprotocol/codex-acp@0.0.44 package, isolated temp directories for startup/auth smoke, a real authenticated one-shot Codex prompt in /tmp/acpx-codex-message, and the published @agentclientprotocol/claude-agent-acp@0.36.1 package binary.
Exact steps or command run after this patch: pnpm run check, pnpm run check:docs, focused registry test rebuild/run, published package version/binary smokes, ACP conformance initialize handshake, isolated acpx codex sessions new startup/auth-required smoke, and a real Codex exec prompt.
Evidence after fix: conformance reported Cases: 1 Passed: 1 Failed: 0; the default acpx codex sessions new path returned structured AUTH_REQUIRED from the new adapter instead of failing to spawn; the real prompt returned acpx-codex-ok and exit code 0; the Claude package binary resolved and exited 0.
Observed result after fix: the new Codex adapter package is reachable from the built-in command path, ACP initialize/auth negotiation works, a real Codex message turn completes successfully, and the Claude built-in range points at the latest published adapter.
What was not tested: multi-turn persistent Codex session reuse with the new adapter, and a live Claude Code prompt through the bumped Claude adapter.

Risks

The main compatibility risk is users relying on the old Zed adapter's thought_level alias through the built-in codex name.
That alias is kept only for explicit legacy Zed adapter commands, while the new default follows the current adapter's advertised ACP model ids.

@dutifulbob dutifulbob marked this pull request as ready for review May 21, 2026 07:24
@dutifulbob dutifulbob force-pushed the chore/agentclientprotocol-codex-acp branch from 3b514d2 to e517ffe Compare May 21, 2026 07:32
@osolmaz osolmaz self-assigned this May 21, 2026
@osolmaz osolmaz merged commit 30b5ee5 into openclaw:main May 21, 2026
12 checks passed
@osolmaz
Copy link
Copy Markdown
Member

osolmaz commented May 21, 2026

Landed via temp rebase onto main.

  • Gate: pnpm run check and pnpm run check:docs passed locally on the PR branch after rebasing onto current main.
  • Land commit: e517ffe
  • Merge commit: 30b5ee5

Thanks @dutifulbob!

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