Skip to content

ACP Protocol Commands

superqode acp provides ACP protocol diagnostics. Agent installation and catalog commands remain under superqode agents.

Check a connection

superqode acp doctor claude --live --protocol-version 2 --json
superqode acp doctor claude --live --protocol v2 --json
superqode agents doctor codex --live --protocol-version 1

superqode acp doctor accepts an optional agent name, --live, --timeout, --protocol-version 1|2, and --json. Without --live, it checks installation and configuration. A live check initializes the agent and opens a session without sending a coding prompt. Output distinguishes the requested and negotiated versions; successful fallback to v1 does not verify v2 compatibility.

--protocol auto|v1|v2 also checks the explicit connection policy. In CI, --live --protocol v2 --json exits with status 1 if v2 cannot be established, while retaining the diagnostic JSON. Without an explicit version or policy, live checks use the saved terminal preference for that agent and project.

Use ACP v2 Preview

CLI/TUI clients default to v1. Choose a policy for the interactive CLI, or save it for both terminal clients:

superqode connect acp claude --protocol auto
superqode connect acp claude --protocol v2
superqode acp protocol auto --agent claude --project-dir .
superqode acp protocol --agent claude --project-dir .

auto prefers v2 and permits a single v1 fallback during negotiation. v1 forces compatibility mode; v2 requires Preview and never falls back. Saved preferences are scoped to the project and agent. An explicit --protocol overrides the saved policy; otherwise the saved policy precedes the existing environment setting. Active sessions keep their negotiated version.

Terminal and macOS protocol policies are stored separately. The terminal saves its choice in acp-protocols.sqlite3 under ~/.superqode (or SUPERQODE_HOME), while the macOS app saves its choice in the app's own preferences. Changing one does not change the other. The terminal also advertises auth.terminal, so an agent may offer terminal sign-in methods; SuperQode prints the exact command and does not run it for you.

The environment opt-in also remains available:

SUPERQODE_ACP_PROTOCOL_VERSION=2 superqode
SUPERQODE_ACP_PROTOCOL_VERSION=2 superqode connect acp claude

V1-only agents remain supported through a bounded reconnect using a v1 handshake. Set SUPERQODE_ACP_PROTOCOL_VERSION=1 to force v1. New macOS ACP connections default to Auto ยท Prefer v2, with a saved per-agent/project choice of Auto, v1 or required v2. See macOS protocol controls.

The Python client also accepts protocol_policy="auto", "v1" or "v2". The last option is strict and disables v1 fallback. The existing protocol_version=2 API retains its v2-with-fallback behavior.

The TUI supports :agents doctor claude --live --protocol-version 2 and :agents cancel <session> tool|terminal <item>. Use :agents cancel <child-session> session only when that child advertises cancellation. The UI also shows child sessions and background item IDs. Commands reject controls the agent has not advertised.

Terminal UI controls

Use these inside the TUI after choosing an ACP agent:

Command Result
:acp protocol [auto|v1|v2] Inspect or save this agent/project's policy for its next session.
:acp status Show the actual negotiated version, requested version, session ID and fallback reason.
:acp activity Inspect foreground/background state, child sessions, tools and display terminals.
:acp sessions [cursor] List retained v2 sessions as readable rows; a More sessions line gives the next cursor.
:acp auth [method-id] List the agent's sign-in methods. Agent methods run directly; terminal methods print the exact command to run in your terminal.
:acp config [id value] List config options or set a value; boolean values use true or false.
:acp new Open a fresh v2 session.
:acp resume <session-id> Resume a root session with replay and current-state synchronization.
:acp close Close the root session, stop its background work and open a fresh one.
:acp cancel <session|root> session Cancel foreground work or an advertised cancellable child.
:acp cancel <session|root> tool|terminal <id> Cancel an item only when that item advertises support.

:agents accepts the same controls. The status bar shows ACP2 or ACP1; ACP1โ†“ identifies fallback. The conversation shows full negotiation details, child transcripts, plans and display-terminal output. Activity rows update as foreground and background work finishes.

Protocol changes keep the visible transcript and open a fresh remote session for the next prompt. Previous prompts are never resent. Configuration and session changes wait until foreground and background work is finished, except an explicit close also stops owned background work; uncertain work is never retried automatically.

Interactive CLI controls

superqode connect acp AGENT accepts the same controls using / instead of :acp, for example /status, /protocol auto, /activity, /auth and /cancel root session. Ctrl+C stops the current foreground response; exit disconnects. Permission questions temporarily take over the prompt and default to rejection when dismissed. Status and cancellation remain available while a response runs.

Both terminal clients provide the scoped, approval-preserving loopback HTTP MCP host bridge when a v2 agent advertises HTTP MCP. Display-terminal commands are never executed merely because an agent includes them in an update. V1 connections and v1 fallback also enforce project scope and request approval for client-hosted file writes and terminal execution.

Serve SuperQode to an editor

superqode serve acp
superqode serve acp --protocol-version 1
superqode serve acp --protocol-version 2 --spec harness.yaml

The default auto mode selects the highest supported version at or below the editor's request. Each connection keeps its negotiated protocol. Restricting the server to v1 provides a rollback for future connections.

V2 session history and retained submission keys live in ~/.superqode/acp-v2/sessions.sqlite3, or under SUPERQODE_HOME. A successful prompt response acknowledges insertion; foreground completion arrives separately. Closing a session stops its foreground and owned background work. Cancelling foreground work leaves independent background work running.

The initial TUI retains pending submissions in memory and never automatically resends uncertain work. The client API provides an optional private, disk-backed outbox and explicit retry using the original key and session. Desktop workers use that outbox; a disconnected task is not automatically replayed as a fresh submission.

See ACP agents, the agent server, and the adoption research and contracts.