Skip to content

OpenAI Codex CLI ​

Produced by the ACP product case-study pass (2026-07-30), then adversarially verified; corrections below override the body where they conflict.

OpenAI Codex CLI: ACP story ​

Status: adapter, not native. OpenAI's own openai/codex repository has no Agent Client Protocol support, no ACP dependency, and no mention of ACP in its README or source (verified via gh search code repo:openai/codex "ACP" returning no relevant hits). All ACP support for Codex comes from a standalone stdio adapter, codex-acp, that wraps the Codex App Server.

Exact package. The adapter is published as @agentclientprotocol/codex-acp on npm, currently v1.1.7 (published 2026-07-22), with source at github.com/agentclientprotocol/codex-acp (Apache-2.0, 206 stars, last push 2026-07-29, actively maintained). It originated as zed-industries/codex-acp (882 stars, 271 commits), which Zed archived on 2026-07-22 with a note that "development has moved to agentclientprotocol/codex-acp." So the adapter's lineage is Zed Industries, and it now lives under the ACP protocol's own steward org rather than under OpenAI or Zed. This is a community/ecosystem-maintained adapter, not an OpenAI-shipped one.

Wiring. codex-acp is a stdio ACP agent server: it starts the Codex App Server as a subprocess, translates ACP JSON-RPC requests into Codex operations, and maps Codex's own events back into ACP notifications. Invocation is npx -y @agentclientprotocol/codex-acp or a global install (npm install -g @agentclientprotocol/codex-acp then codex-acp). CODEX_PATH redirects it to a different Codex binary instead of the bundled @openai/codex dependency. Auth is negotiated over ACP's own auth-method handshake: ChatGPT browser login (suppressed with NO_BROWSER=1 for headless/remote use), an API key via CODEX_API_KEY or OPENAI_API_KEY, or a client-supplied custom OpenAI-compatible gateway. Session/runtime knobs include CODEX_CONFIG (JSON merged into session config), MODEL_PROVIDER, INITIAL_AGENT_MODE (read-only / agent / agent-full-access), and APP_SERVER_LOGS. Permission requests, shell command execution, file-change, and terminal-output events are all mapped onto standard ACP tool-call/permission RPCs; subagent launches surface as ordinary ACP tool calls carrying Codex-specific thread identity in namespaced _meta.codex.subagent metadata rather than a bespoke channel. MCP passthrough is explicit: the adapter accepts client-provided MCP servers over both command-based stdio config and HTTP transport, and exposes an /mcp slash command.

Channel mapping. Codex does map into non-editor surfaces, but not through ACP. OpenAI ships a first-party Codex Slack app (Slack marketplace listing A09F5C369E3-openai-codex) that lets a team tag @Codex in a channel or thread to trigger Codex Cloud tasks, plus a Linear integration for the same cloud-task model. These are OpenAI-native cloud product integrations, architecturally separate from the local ACP stdio adapter; there is no evidence they run over ACP or are reachable from an ACP client.

Callability from trogonai today. Yes, as an ACP agent: trogonai's acp-nats-agent side can spawn npx -y @agentclientprotocol/codex-acp (or a pinned local install) as a stdio child process and bridge it onto the NATS-carried ACP JSON-RPC binding exactly as it would any other stdio ACP agent, since codex-acp already speaks standard ACP verbs (initialize, session/new, session/prompt, permission callbacks, fs/terminal RPCs). Headless viability requires forcing API-key or gateway auth (CODEX_API_KEY/OPENAI_API_KEY) and NO_BROWSER=1 to avoid the interactive ChatGPT OAuth flow. Licensing is Apache-2.0 for the adapter, but functional use still runs through OpenAI's own Codex CLI (bundled dependency) and its terms. One open item worth pinning down before production use: trogonai's Rust SDK is pinned to agent-client-protocol =2.0.0 wire v1, while codex-acp is a separate TypeScript ACP implementation; exact wire-version compatibility should be verified against the adapter's own ACP SDK dependency rather than assumed.

Design lessons. (1) A protocol-neutral CLI can gain ACP support entirely through an external adapter process without upstream cooperation; trogonai's ACP boundary should assume most agents will arrive this way, not natively. (2) Keeping cloud/chat-channel integrations (Slack, Linear) architecturally separate from the local stdio ACP surface, as OpenAI does, avoids conflating "channel routing" with "agent protocol"; trogonai should keep its own channel-to-session mapping outside the ACP transport rather than trying to make ACP double as a chat-routing protocol. (3) The adapter's env-var-driven auth negotiation (ChatGPT vs API key vs custom gateway, selectable at the ACP auth-method layer) is a clean pattern for headless hosting: expose auth method choice as a first-class ACP capability rather than hardcoding one flow.

Sources ​

Adversarial verification ​

  • confirmed: ACP status is adapter with mechanism: npm package @agentclientprotocol/codex-acp (CLI: codex-acp), repo github.com/agentclientprotocol/codex-acp, v1.1.7 (gh api repos/agentclientprotocol/codex-acp confirms the repo exists under that org; npm view @agentclientprotocol/codex-acp shows version 1.1.7, bin codex-acp, latest dist-tag 1.1.7.)
  • refuted: Callability verdict yes: trogonai's acp-nats-agent spawns/wraps codex-acp as a stdio child exactly like any other stdio ACP agent, needing no trogonai-specific protocol work (Read the acp-nats-agent README in the trogonai repo: acp-nats-agent is a framework where you implement the AgentHandler trait yourself (it IS the agent side, exposed over NATS), not a client that spawns external stdio ACP agents as child processes; grepped the whole workspace for 'codex' (zero hits in source/docs/ADRs) and for a Command::new-based stdio-agent spawner (none found) -- no crate in trogonai today spawns or wraps codex-acp, so 'no trogonai-specific work needed' is contradicted by the absence of any such client-host component.)
  • confirmed: Codex CLI has no native ACP support in openai/codex itself; ACP is provided entirely by third-party stdio adapter codex-acp (gh api search/code found no agent-client-protocol references in openai/codex; openai/codex issue #9085 requesting ACP support is closed as not planned; web search corroborates MCP is the only protocol codex CLI supports natively, with ACP support provided via third-party adapters.)
  • confirmed: Adapter originated at zed-industries/codex-acp (Apache-2.0, 882 stars), archived 2026-07-22, development moved to agentclientprotocol/codex-acp (gh api repos/zed-industries/codex-acp shows archived:true, stargazers_count:882, pushed_at 2026-07-22T08:01:25Z, homepage pointing to agentclientprotocol/codex-acp, and LICENSE file is Apache License 2.0 text.)
  • confirmed: agentclientprotocol/codex-acp is active (last push 2026-07-29), 206 stars, latest release v1.1.7 published 2026-07-22, npm package at 1.1.7 (gh api repos/agentclientprotocol/codex-acp shows stargazers_count:206, pushed_at 2026-07-29T07:48:29Z, archived:false; gh api .../releases shows v1.1.7 published_at 2026-07-22T14:55:03Z; npm view confirms version 1.1.7 published about a week before the check date.)
  • confirmed: Exact invocation: npx -y @agentclientprotocol/codex-acp or global install then codex-acp; CODEX_PATH env var points to an alternate Codex binary instead of the bundled @openai/codex dependency (Fetched the repo's README.md, which confirms both invocation forms and the CODEX_PATH override; npm view shows @openai/codex ^0.145.0 as an actual dependency, consistent with CODEX_PATH being an override of that bundled default.)
  • confirmed: Auth methods advertised over ACP: ChatGPT login (browser OAuth, hidden with NO_BROWSER=1), API key via CODEX_API_KEY or OPENAI_API_KEY, or a client-provided custom OpenAI-compatible gateway (Fetching the README.md explicitly lists all three auth methods with those exact env var names and semantics (CODEX_API_KEY takes precedence over OPENAI_API_KEY, NO_BROWSER=1 suppresses the browser OAuth flow).)

Corrections (authoritative where they conflict with the body) ​

Claim 2's callability verdict is not supported: trogonai has no existing component that spawns a third-party stdio ACP agent (codex-acp or otherwise) as a child process. acp-nats-agent is a framework for implementing the ACP agent role directly in Rust (you write initialize/authenticate/new_session/prompt/cancel handlers), and acp-nats-stdio/acp-nats-server face the opposite direction (IDE or HTTP/WS clients talking inward to a NATS-backed agent). Wiring codex-acp into trogonai would require building a new client-host component (something that runs codex-acp as a subprocess, speaks ACP as the client role over its stdio, and bridges that onto a NATS subject) that does not exist in the codebase today; this is real, non-trivial trogonai-specific work, not a drop-in reuse of acp-nats-agent. Separately, note (not a refutation of any listed sub-claim) that the current agentclientprotocol/codex-acp implementation is TypeScript (uses tsx/bun/vitest, depends on @agentclientprotocol/sdk ^1.3.0 and @openai/codex ^0.145.0), a rewrite from the original Rust codebase at zed-industries/codex-acp; this matters only in that "codex-acp already implements the standard ACP methods that agent-client-protocol=2.0.0 expects" conflates a Rust crate version (agent-client-protocol=2.0.0, confirmed pinned in trogonai's Cargo.toml/Cargo.lock) with a same-language SDK dependency of codex-acp, which is actually the separate TypeScript @agentclientprotocol/sdk package; protocol-level interop across languages is still expected to work since ACP is JSON-RPC over stdio, but the claim's phrasing implies a closer technical kinship than exists. Also, the Apache-2.0 LICENSE file content in agentclientprotocol/codex-acp is copyrighted to JetBrains s.r.o. 2025, not attributed to Zed Industries as the claim's framing might imply, though the license type (Apache-2.0) itself is correctly stated.

Released under the Apache License 2.0.