Skip to content
GitHub stars

Agent Client Protocol (ACP)

ACP is an open protocol from Zed for editor-to-agent communication over stdin/stdout JSON-RPC. roborev uses ACP to integrate agents that don’t have built-in adapters. If an agent speaks ACP (or has a wrapper that does), you can plug it in.

roborev acts as the ACP client. The agent process is the ACP server.

  1. roborev launches the agent command as a subprocess
  2. Communication happens via stdin/stdout JSON-RPC
  3. roborev negotiates a session mode and model with the agent
  4. Prompts are sent, and the agent streams responses back
  5. roborev enforces file access boundaries (read-only vs read-write) at the operation level

Several agents have ACP wrappers you can install directly.

AgentACP WrapperInstall
Codexcodex-acpnpm install -g @zed-industries/codex-acp
Claude Codeclaude-agent-acpnpm install -g @zed-industries/claude-agent-acp
Geminigemini --experimental-acpnpm install -g @google/gemini-cli

Set command to the wrapper binary in your ACP config:

~/.roborev/config.toml
[acp]
name = "codex-acp"
command = "codex-acp"

Override the ACP command for a single invocation without editing config files:

Terminal window
ROBOREV_ACP_ADAPTER_COMMAND=/opt/agents/my-custom-acp roborev review HEAD

Confirm the configured command is on your PATH, then run a review to test end-to-end communication:

Terminal window
which codex-acp # or your configured command
roborev review HEAD

Any binary that implements the ACP server protocol can be used. Set command to its path:

~/.roborev/config.toml
[acp]
name = "my-agent"
command = "/usr/local/bin/my-acp-agent"
args = ["--verbose"]

Once configured, the agent can be selected with --agent my-agent.

Configure ACP in the [acp] section of ~/.roborev/config.toml:

[acp]
name = "my-agent" # Agent name (required)
command = "/usr/local/bin/my-acp" # ACP agent command (required)
args = ["--verbose"] # Additional arguments
model = "my-model" # Default model
timeout = 600 # Timeout in seconds (default: 600)
read_only_mode = "plan" # Mode for review flows
auto_approve_mode = "auto-approve" # Mode for agentic flows
disable_mode_negotiation = false # Skip SetSessionMode RPC
OptionTypeDefaultDescription
namestring(required)Agent name used in --agent flag
commandstring(required)Path or command for the ACP agent binary
argsarray[]Additional CLI arguments passed to the agent
modelstringDefault model to request from the agent
timeoutint600Command timeout in seconds
read_only_modestring"plan"Mode value sent for review (read-only) flows
auto_approve_modestring"auto-approve"Mode value sent for agentic flows
modestringDefault agent mode (overrides read_only_mode unless explicitly opting in)
disable_mode_negotiationboolfalseSkip ACP SetSessionMode RPC while keeping authorization behavior

roborev selects the ACP session mode automatically based on the workflow.

Uses read_only_mode (default: "plan"). The agent can read files but cannot write or run commands. This is used during roborev review and roborev run (without --agentic).

Uses auto_approve_mode (default: "auto-approve"). The agent can edit files and run commands. This is used during roborev refine and roborev run --agentic.

Some agents don’t support ACP session modes. Set disable_mode_negotiation = true to skip the SetSessionMode RPC call. roborev still enforces its own authorization boundaries (read-only vs read-write) regardless of this setting.

ACP agents run as subprocesses with the following guardrails:

  • Path validation: File operations (reads, writes, edits) are validated against the repository root using symlink-aware path resolution. Terminal operations in read-write mode are not path-bounded and can execute arbitrary commands.
  • Mode enforcement: Write and terminal operations are blocked at the operation boundary in read-only mode, independent of what the agent requests.
  • Bounded reads: File reads are capped at 10 MB. Terminal output is capped at 1 MB.

”no Codex ACP wrapper command was found”

Section titled “”no Codex ACP wrapper command was found””

The ACP wrapper package is not installed. Install it:

Terminal window
npm install -g @zed-industries/codex-acp

The agent doesn’t support the requested session mode. Check which modes the agent supports, or set disable_mode_negotiation = true in your [acp] config.

The agent doesn’t support the requested model. Remove the model field from your [acp] config, or check the agent’s documentation for supported model names.

”write operation not permitted in read-only mode”

Section titled “”write operation not permitted in read-only mode””

This is expected during reviews. The agent attempted a write operation, but roborev blocked it because the task is running in review (read-only) mode. If you need file edits, use roborev refine or roborev run --agentic.