ACP Integration
Run Crabcode as an Agent Client Protocol server for compatible editors.
Run Crabcode from an ACP-compatible editor or IDE with a stdio subprocess. ACP keeps the workspace, credentials, tools, permissions, and session history on the machine running Crabcode.
Start the server
crabcode acpUse --cwd when the editor should start Crabcode for a specific workspace:
crabcode acp --cwd /absolute/path/to/projectACP uses stdin and stdout for JSON-RPC traffic. Do not wrap the command with a program that writes banners or logs to stdout.
Editor configuration
For Zed, add an agent server to ~/.config/zed/settings.json:
{
"agent_servers": {
"Crabcode": {
"command": "crabcode",
"args": ["acp"]
}
}
}Configure a provider in the Crabcode TUI with /connect before starting an ACP session. Credentials remain in Crabcode's normal state directory; the editor does not receive API keys or OAuth tokens.
Capability Matrix
Session behavior
session/close detaches the editor and cancels any active turn. It does not delete Crabcode session history. Load replays the stored transcript; resume restores the session configuration without replaying prior content. Fork creates a new persisted session with a copied transcript.
Safety notes
Crabcode applies the same configured permission rules in ACP as it does in the TUI. When a tool needs approval, the editor receives an ACP permission request. If the editor cannot respond or disconnects, Crabcode denies the request rather than continuing unattended.
Client-supplied MCP servers run with the same trust as project-configured MCP: stdio servers can execute local processes, and remote servers can send the headers and credentials the editor provides. Only attach MCP servers you trust for that workspace.
Image attachments are decoded under a size limit and written to temporary files under the system temp directory (…/crabcode/acp-images/) for the model turn. Prefer cleaning those files after long ACP sessions until automatic cleanup lands.
The capability matrix matches what the ACP server implements today. Crabcode only advertises protocol capability flags it handles (loadSession, image and embedded-context prompts, HTTP/SSE MCP, and list/resume/fork/close session ops).