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@0.14.1.
opencorvus acp
opencorvus acp # current directoryopencorvus acp --cwd /path/to/projectOPENCORVUS_ENABLE_QUESTION_TOOL=1 opencorvus acpSource: packages/opencorvus/src/cli/cmd/acp.ts
On startup:
- Internal
opencorvus serveon a random port - Creates an
@opencorvus-ai/sdkclient against that internal server - Opens a JSON-RPC channel over stdin/stdout via
ndJsonStreamfrom@agentclientprotocol/sdk - 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
| Method | Description |
|---|---|
initialize | Negotiates protocol version (1), advertises capabilities |
Advertised (src/acp/agent.ts): loadSession: true; MCP http, sse; prompt embeddedContext, image; session fork, list, resume.
Session management
| Method | Description |
|---|---|
session/new | Creates new session |
session/load | Loads session, replays history, restores model and mode |
unstable_listSessions | Lists sessions newest first, 100/page cursor |
unstable_forkSession | Forks a session, replays history |
unstable_resumeSession | Resumes without replay |
unstable_setSessionModel | Switches model, supports variants |
setSessionMode | Switches primary agent |
Prompting
| Method | Description |
|---|---|
session/prompt | Sends message; text / image / resource_link / resource; /command prefix → slash command |
Real-time notifications
Via connection.sessionUpdate():
| Update | When |
|---|---|
agent_message_chunk | Streaming AI text (driven by message.part.delta) |
agent_thought_chunk | Reasoning model thoughts |
tool_call | Tool invocation start |
tool_call_update | In progress / done / failed |
plan | Todo list sync on todowrite completion |
usage_update | Tokens + cost after each prompt |
available_commands_update | Slash commands on session load |
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 HTTP/SSE (
url,headers)
ACP calls sdk.mcp.add() to register each server into the internal opencorvus instance.
vs opencorvus serve (REST)
| Dimension | ACP | serve |
|---|---|---|
| Transport | stdin/stdout (ndjson) | HTTP (REST + SSE) |
| Clients | ACP-compatible editors | Browser / SDK / GH Action |
| Protocol | ACP v1 (JSON-RPC) | Custom REST |
| Streaming | session/update | SSE /event |
| External port | None | 7878 |
| Concurrency | Single client | Multi-client |
vs MCP
| Dimension | ACP | MCP |
|---|---|---|
| Role | Editor ↔ AI agent | LLM ↔ tool/data |
| Direction | Editor calls agent | LLM calls tools |
| Sessions | Yes (session/new/load) | No |
| Permission UI | Agent asks editor | N/A |
| OpenCorvus | ACP Server (editor connects) | MCP Client (connects to external MCP) |
Current limitations
(src/acp/README.md)
- Authentication:
authenticatethrows immediately - Session persistence:
session/loadreplays messages but does not restore working-directory snapshot - Terminal support: terminal capability in
client.tsis a stub - Session mode switching:
setSessionModeworks but lacks UI feedback