Harness Notes

ACP

Updated 2026-11-25,

On this page

The Agent Client Protocol (ACP) lets an editor such as Zed or a JetBrains IDE run a coding agent in its own panel. How to connect each harness, what carries over from its terminal app, and how much of the work the editor sees and controls.

Getting connected

QuestionCodex CLIchecked at codex-acp 2.2.2, Codex 0.162.1
Run it as an ACP agent

Codex has no ACP mode of its own; run the adapter npx -y @agentclientprotocol/codex-acp (binary codex-acp), which starts codex app-server and translates between the two protocols. It bundles Codex 0.160.1; set CODEX_PATH=/path/to/codex to use your own Codex.

The older Rust zed-industries/codex-acp repository is archived; the current adapter lives at agentclientprotocol/codex-acp.

A @preview npm tag tracks unreleased main.

Add it to Zed, JetBrains or another editor

The ACP registry lists it as codex-acp (npx @agentclientprotocol/codex-acp@2.2.2), so Zed and JetBrains install it from their registry UI. Zed users start a Codex thread from the Agent Panel; for a custom build add an agent_servers entry with "command": "/path/to/codex-acp" and optional "env": {"CODEX_PATH": "/path/to/codex"}.

Signing in

initialize advertises api-key (reads CODEX_API_KEY, then OPENAI_API_KEY) and chat-gpt (browser login, hidden when NO_BROWSER is set). Clients that support URL elicitation also get chat-gpt-device-code, and clients that opt in get a gateway method for a custom OpenAI-compatible endpoint. Existing codex login credentials in ~/.codex are reused, and /logout or authentication/logout signs out.

Elicitation here is an ACP client/host contract, not proof of downstream MCP elicitation mode support or validation; see docs/research/mcp-elicitation.md.

Sessions and settings

QuestionCodex CLIchecked at codex-acp 2.2.2, Codex 0.162.1
Resume, list or fork past sessions

loadSession is true and sessionCapabilities advertises list, resume, fork, close and delete, so editors can list, reload (with history replay), resume and fork sessions. Listing reads Codex's own thread store across cli, vscode, exec and appServer sources, so sessions started in the terminal codex show up in the editor and vice versa.

session/list is filtered to the active model provider and, when given, the cwd.

Switch mode or model from the editor

session/set_mode and config options switch between read-only, workspace-write, agent (Auto review, the default) and agent-full-access; INITIAL_AGENT_MODE picks the starting mode. Config options also cover model, reasoning_effort, fast-mode (where the model supports it) and collaboration_mode (Default or Plan).

Slash commands and skills

The adapter sends available_commands_update with built-ins /plan, /mcp, /skills, /status, /review, /review-branch, /review-commit, /compact, /goal, /rename and /logout, plus every Codex skill found for the session's roots as $skill-name.

Codex custom prompts are not listed; skills are.

Working with the editor

QuestionCodex CLIchecked at codex-acp 2.2.2, Codex 0.162.1
Approving tool calls

Codex approval requests become session/request_permission with options such as Yes, proceed (allow_once), Yes, and don't ask again for this command in this session or for a command prefix (allow_always), network-host allow/block, and No, and tell Codex what to do differently (reject_once). Approval and sandbox policy come from the ACP mode sent on every turn, not from approval_policy/sandbox_mode in config.toml; Codex exec-policy rules still apply, and prefix approvals are saved as rules.

Edits through the editor's buffers

Not supported

Codex reads and writes files itself on disk; the adapter never calls fs/read_text_file or fs/write_text_file, so unsaved editor buffers are not seen. Edits are reported back as tool calls with ACP diff content, so the editor still shows the change.

Commands in the editor's terminal

Not supported

Commands run in Codex's own sandboxed shell; the adapter never calls terminal/create. Output streams into the tool call as terminal content with _meta.terminal_output / terminal_output_delta chunks for clients that declare them (the Zed convention), otherwise as text.

MCP servers from the editor

Partly

Servers passed in session/new are added to the session's Codex config for stdio (command) and http transports; sse and acp transports are rejected (mcpCapabilities.sse: false). Codex also keeps loading its own mcp_servers from config.toml, and a requested server whose name already exists there is skipped (set DISABLE_MCP_CONFIG_FILTERING=true to turn that off).

What prompts carry and what streams back

Partly

Prompts accept text, images, embedded resources (inlined as <context> blocks) and resource links (as text links); audio is advertised false and dropped. Back come agent message and thought chunks, plan entries and plan-mode markdown (plan_update when the client declares plan support), tool calls with diffs and command output, usage_update, session title updates and, after negotiation, native subagent sessions.

The other direction

QuestionCodex CLIchecked at codex-acp 2.2.2, Codex 0.162.1
Drive other ACP agents

Not supported

Neither Codex 0.162.1 nor the adapter can drive other ACP agents: the Codex CLI has no ACP command or ACP dependency, and the adapter only implements the agent side. Codex subagents are its own threads, which the adapter can surface to the editor as ACP subagent sessions.

Notes and sources

Codex CLI, 26 sources
  • Codex itself has no ACP mode; every answer here describes the @agentclientprotocol/codex-acp adapter driving codex app-server.
  • JetBrains AIR clients get extra _meta.jetbrains.air extensions (goals, async tasks, Git-patch diffs) that other editors do not see.
  • Remote connectivity, provider relay, cloud handoff and execution lifetime are separately audited on 2026-10-19 in registry/remote.json. ACP answers retain the observed versions recorded here; stdio support does not imply network attachment.
Run it as an ACP agent, 5
Add it to Zed, JetBrains or another editor, 3
Signing in, 3
Resume, list or fork past sessions, 3
Switch mode or model from the editor, 3
Slash commands and skills, 2
Approving tool calls, 3
Edits through the editor's buffers, 2
Commands in the editor's terminal, 2
MCP servers from the editor, 2
What prompts carry and what streams back, 5
Drive other ACP agents, 4