Skip to content

ACP Support

Use OpenCorvus in any ACP-compatible editor (e.g. Zed) over stdin/stdout JSON-RPC.

ACP is a standardized communication protocol that decouples AI coding agents from editors, letting both sides evolve independently.

Source: packages/opencorvus/src/acp/. SDK: @agentclientprotocol/sdk@1.4.0.

opencorvus acp

Terminal window
opencorvus acp # current directory
opencorvus acp --cwd /path/to/project
OPENCORVUS_ENABLE_QUESTION_TOOL=1 opencorvus acp

Source: packages/opencorvus/src/cli/cmd/acp.ts

On startup:

  1. Internal opencorvus serve on a random port
  2. Creates an @opencorvus-ai/sdk client against that internal server
  3. Opens a JSON-RPC channel over stdin/stdout via ndJsonStream from @agentclientprotocol/sdk
  4. Instantiates ACP.Agent, waits for client messages

Transport: newline-delimited JSON over stdio — no external TCP port (src/cli/cmd/acp.ts).

Connecting Zed

~/.config/zed/settings.json:

{
"agent_servers": {
"OpenCorvus": {
"command": "opencorvus",
"args": ["acp"]
}
}
}

Zed spawns opencorvus acp on demand and communicates via stdin/stdout (src/acp/README.md).

Supported ACP methods

Initialization

MethodDescription
initializeNegotiates protocol version (1), advertises capabilities

Advertised (src/acp/agent.ts): loadSession: true; MCP http, sse; prompt embeddedContext, image; session fork, list, resume.

Session management

MethodDescription
session/newCreates new session
session/loadLoads session, replays history, restores model and mode
listSessionsLists root sessions newest first, with 100 per page. Omit the working directory to list across projects.
unstable_forkSessionForks a session, replays history
resumeSessionResumes without replay
setSessionConfigOptionSwitches model, supports variants
setSessionModeSwitches primary agent

Loading a session restores its exact saved primary agent, including an agent hidden from the general mode picker. New standalone sessions keep the project’s visible default, and previously used primary agents stay selectable when switching modes or saving new turns. A web Chat or Work session declares its own fixed mode even before its first message; the editor cannot switch that session to a different primary. A normal fork uses the actual fork’s identity and retained history, so an independent fork can switch to an offered coding mode. Mode requests must use an entry returned for that session; invalid choices report the session, requested mode, and available mode IDs. Task, Mission, and Control operations retain their existing dedicated entry points.

Prompting

MethodDescription
session/promptSends message; text / image / resource_link / resource; /command prefix → slash command

Real-time notifications

Via connection.sessionUpdate():

UpdateWhen
agent_message_chunkStreaming AI text (driven by message.part.delta)
agent_thought_chunkReasoning model thoughts
tool_callTool invocation start
tool_call_updateIn progress / done / failed
planTodo list sync on todo write completion
usage_updateTokens + cost after each prompt
available_commands_updateCurrent slash commands after the session’s project connections are attached

Commands with declared inputs include an editor hint. A remote prompt can show <date> [scope] for a required date and an optional scope. Project templates with argument placeholders show [arguments] for free text. Editors that use this field can keep the command in the input box while the user fills in its arguments.

When a user attaches an image or embeds a resource with a registered slash command, the command text supplies the arguments and the attached content becomes part of the conversation input. For example, mentioning a project file after a report date passes the file contents to the conversation and sends the date to the remote report prompt.

Authentication

Permission handling

ACP forwards durable permission.asked events through connection.requestPermission(). Eligible choices map to allow_once, allow_task, allow_project, or deny on the canonical permission request.

For edit permissions, after client approval, ACP calls connection.writeTextFile() to push the patched content to the editor (src/acp/agent.ts).

MCP server support

session/new and session/load accept an mcpServers list:

  • Local processes (command, args, env)
  • Remote Streamable HTTP (type: "http", url, headers)
  • Remote server-sent events (type: "sse", url, headers)

ACP calls sdk.mcp.add() to register each server into the internal opencorvus instance.

vs opencorvus serve (REST)

DimensionACPserve
Transportstdin/stdout (ndjson)HTTP (REST + SSE)
ClientsACP-compatible editorsBrowser / SDK / GH Action
ProtocolACP v1 (JSON-RPC)Custom REST
Streamingsession/updateSSE /event
External portNone7878
ConcurrencySingle clientMulti-client

vs MCP

DimensionACPMCP
RoleEditor ↔ AI agentLLM ↔ tool/data
DirectionEditor calls agentLLM calls tools
SessionsYes (session/new/load)No
Permission UIAgent asks editorN/A
OpenCorvusACP Server (editor connects)MCP Client (connects to external MCP)

Current limitations

(src/acp/README.md)

  • Authentication: authenticate throws immediately
  • Session persistence: session/load replays messages but does not restore working-directory snapshot
  • Terminal support: terminal capability in client.ts is a stub
  • Session mode switching: setSessionMode works but lacks UI feedback