Why ACP
A one-shot adapter runsrun(task) -> answer: no memory between messages, no sign of life until the end, no way to interrupt. Over ACP (ADR 0001):
- Sessions give continuity. Each room continues one conversation, keyed by room and access tier, so a guest never inherits an owner’s context. Session ids survive a worker restart (
<workspace>/sessions.json); a session retires after a turn or idle limit, and the room is told. session/updategives progress. The worker edits itsOn it...placeholder as tools run (never with the model’s reasoning), then edits it into the answer.session/cancelgives interruption when a turn overruns.
Spawn a local agent (stdio)
initialize, and stops with an actionable sentence if the bridge is not installed or the agent is not logged in. It never opens an interactive terminal; log in to the agent yourself. Claude Code speaks ACP through an npm bridge that agent-connect pins (@agentclientprotocol/claude-agent-acp@0.64.2).
Dial an agent that is already running (WebSocket)
An ACP agent can also be reached over a WebSocket URL instead of being spawned per message (ADR 0004). This follows ACP’s remote-transport proposal, which is not yet stable ACP.
Rules worth knowing:
- No fallback. A dial that fails stays failed; the worker never spawns a local agent to cover for it.
- Loopback by default. The permission policy resolves file paths on this machine; for an agent on another host its answers are guesses, so you opt in by name.
- Cancel is a request. A spawned agent that ignores
session/cancelis stopped; a dialled one is not the worker’s to stop, so the connection is dropped and the room is told the agent may still be working.
Who may use it
The ACP adapter is owner tier only. Aguest task is refused with a reply in the room and never reaches the agent; see Access tiers.
Build your own ACP agent
Any program that implements the ACP agent role over stdio works withAGENT_CONNECT_ACP_COMMAND; one that also opens a WebSocket listener works with AGENT_CONNECT_ACP_URL. Implement initialize, session/new, session/prompt with session/update notifications, session/cancel, and optionally session/load so a room’s conversation survives a worker restart. Ask permission (session/request_permission) before touching files if you want the worker’s policy to apply.
The full settings list is in agent-connect’s README.