What is ACP
ACP is a standardized protocol for editors to interact with AI coding agents. It handles session lifecycle, user prompts, tool execution, permissions, and real-time streaming — all through a structured message format over stdin/stdout. See the Agent Client Protocol specification for the full protocol definition.Starting the ACP server
--port, --hostname, --mdns, --mdns-domain, --cors.
Protocol capabilities
The 0x0 ACP agent advertises these capabilities during initialization:| Capability | Description |
|---|---|
loadSession | Resume existing sessions |
mcp | MCP server support (HTTP and SSE transports) |
prompt.embeddedContext | Accept embedded context in prompts |
prompt.image | Accept image attachments |
session.fork | Fork sessions from a specific point |
session.list | List available sessions |
session.resume | Resume sessions without replaying history |
Supported operations
Session management
| Operation | Description |
|---|---|
session/new | Create a new session with model and MCP configuration |
session/load | Load an existing session and replay message history |
cancel | Abort the current session operation |
setSessionMode | Switch between agents (modes map to 0x0 agents) |
unstable_listSessions | Paginated session listing |
unstable_forkSession | Fork a session |
unstable_resumeSession | Resume without history replay |
unstable_setSessionModel | Change the model for a session |
Prompting
| Operation | Description |
|---|---|
session/prompt | Send a user message with text, images, resources, or resource links |
Real-time events
The ACP server streams events to the client as the agent works:| Event | Description |
|---|---|
agent_message_chunk | Incremental text output |
agent_thought_chunk | Reasoning/thinking blocks |
tool_call | Tool invocation with arguments |
tool_call_update | Tool execution progress and results |
plan | TODO list updates |
usage | Token usage and cost information |
Permissions
When a tool call requires user approval, the ACP server sends arequestPermission to the client.
The client responds with one of:
| Response | Description |
|---|---|
allow_once | Allow this single request |
allow_always | Add a permanent allow rule |
reject_once | Reject this request |