Harness Notes

ACP

Updated 2026-11-22,

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

QuestionClaude Codechecked at claude-agent-acp 0.90.0
Run it as an ACP agent

Claude Code has no ACP mode of its own; run the adapter npx @agentclientprotocol/claude-agent-acp (binary claude-agent-acp), built on the Claude Agent SDK. It bundles Claude Code 2.1.296; set CLAUDE_CODE_EXECUTABLE to use your own claude.

The package was formerly @zed-industries/claude-code-acp (repo zed-industries/claude-code-acp); that name is deprecated at 0.16.2.

claude-agent-acp --cli <args> runs the bundled Claude Code CLI directly, e.g. for login.

Set CLAUDE_AGENT_ACP_EXPERIMENTAL_V2=1 to also serve the draft ACP v2 to clients that ask for it.

Add it to Zed, JetBrains or another editor

The ACP registry lists it as claude-acp ("Claude Agent"), launched with npx @agentclientprotocol/claude-agent-acp@0.90.0, so registry-aware editors such as Zed (zed: acp registry, or Agent Settings > External Agents > Install from Registry) and JetBrains install it in one step. Other clients can configure it as a custom stdio agent running npx @agentclientprotocol/claude-agent-acp.

The registry also carries a preview channel (0.90.1-preview.12) built from every push to main.

Signing in

Sign-in reuses Claude Code's own credentials (claude auth login, ANTHROPIC_API_KEY, or Bedrock/Vertex env), and the agent pushes the current identity on _auth/status_update. When the client declares auth.terminal, initialize advertises terminal auth methods claude-ai-login (Claude subscription) and console-login (Anthropic Console), which run claude-agent-acp --cli auth login --claudeai|--console; over SSH it offers claude-login instead. Clients that declare auth._meta.gateway also get gateway/gateway-bedrock methods, and logout is supported.

Launch with --hide-claude-auth to hide the subscription login and refuse turns a claude.ai subscription would pay for.

Sessions and settings

QuestionClaude Codechecked at claude-agent-acp 0.90.0
Resume, list or fork past sessions

It implements session/list, session/load (with history replay), session/resume, session/fork, session/close and session/delete. Sessions are Claude Code's own transcripts, so conversations started in the editor show up in claude --resume and vice versa.

session/list can be filtered by cwd and is paged with a cursor.

Subagent child sessions are replayed from their own transcripts when the client declares subagents.

Switch mode or model from the editor

session/set_mode switches among default (Manual), acceptEdits, plan, auto and, unless disabled by settings or running as root outside a sandbox, bypassPermissions. Model, effort (thought_level) and Fast mode are session config options changed with session/set_config_option; there is no separate session/set_model handler.

The mode is also exposed as a config option, so clients that only use config options can switch it too.

Slash commands and skills

After session setup the agent sends available_commands_update with Claude Code's slash commands, including custom commands, skills and MCP prompts. A few terminal-only commands such as /clear, /cost, /login, /logout and /todos are withheld, and /mcp is answered by the adapter itself.

Working with the editor

QuestionClaude Codechecked at claude-agent-acp 0.90.0
Approving tool calls

Whenever Claude Code would prompt, the adapter sends session/request_permission with options such as allow_once ("Yes"), allow_always ("Yes, and don't ask again for ...", which saves a Claude Code permission rule) and reject_once ("No"). Claude Code's own permissions allow/deny rules from user, project and local settings, and the current permission mode, still apply, so only undecided calls reach the editor.

Exiting plan mode is offered as a permission request whose options pick the next mode (auto, accept edits, bypass, or manual).

Edits through the editor's buffers

Not supported

Claude Code's built-in Read, Edit and Write tools work directly on disk, and the adapter never calls fs/read_text_file or fs/write_text_file, so unsaved editor buffers are not seen. Edits are still reported to the editor as tool calls with diffs.

Commands in the editor's terminal

Not supported

Commands run in Claude Code's own Bash tool, and the adapter never calls terminal/create. Clients that opt in with _meta.terminal_output (or terminal_output_delta) get the command output rendered as a terminal via _meta.terminal_info/terminal_output/terminal_exit on the tool call.

MCP servers from the editor

MCP servers passed in session/new are used, with stdio, http and sse transports (mcpCapabilities.http and .sse are advertised). Claude Code also loads its own configured MCP servers from user, project and local settings and .mcp.json, alongside the editor's.

/mcp in the chat lists server status and can reconnect, enable or disable a server; reconnecting a server that needs auth starts MCP OAuth via URL elicitation.

This describes the ACP host browser flow for MCP OAuth, not downstream MCP URL-mode elicitation. Keep these protocols separate; see docs/research/mcp-elicitation.md.

What prompts carry and what streams back

Partly

Prompts can carry text, images (base64 or http URL), embedded text resources (added as <context> blocks) and resource links; audio and binary blob resources are dropped. Streamed back are message and thought chunks, plans (plan from TodoWrite), tool calls with diffs, terminal output, usage_update with token usage and cost, and subagent child sessions for clients that declare subagents.

The other direction

QuestionClaude Codechecked at claude-agent-acp 0.90.0
Drive other ACP agents

Not supported

Neither Claude Code nor the adapter can drive other ACP agents. Claude Code's subagents are its own Agent tool, not ACP agents.

Notes and sources

Claude Code, 31 sources
  • Claude Code has no native ACP mode; editors run the claude-agent-acp adapter, which spawns Claude Code through the Claude Agent SDK.
  • The adapter bundles its own Claude Code build (2.1.296 in adapter 0.90.0), which lags the terminal release; set CLAUDE_CODE_EXECUTABLE to use your installed claude.
  • Settings, CLAUDE.md, hooks, skills and MCP config are read from the same user/project/local sources as the terminal app.
  • 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, 7
Add it to Zed, JetBrains or another editor, 3
Signing in, 4
Resume, list or fork past sessions, 3
Switch mode or model from the editor, 5
Slash commands and skills, 3
Approving tool calls, 4
Edits through the editor's buffers, 3
Commands in the editor's terminal, 2
MCP servers from the editor, 3
What prompts carry and what streams back, 4
Drive other ACP agents, 3