Skip to main content

ACP protocol surface

Tackle is an ACP server. This page is the account of what crosses the wire in each direction, and which parts are capability-gated.

Protocol versions​

Tackle serves ACP v1 (stable) and ACP v2 (draft) from one binary. The initialize request selects the version per connection: v1 clients get the v1 surface, v2 clients get the v2 surface, and an unsupported version is rejected with -32022. The two implementations are siblings (acp::v1, acp::v2) over a shared neutral layer (acp::common); neither imports the other, and an architecture check enforces that boundary.

The versions differ in shape, not in intent:

  • v2 capability markers are objects nested under session, and initialize requires info.
  • session/prompt is an insertion response carrying the user message messageId, followed by a foreground state machine (running, requires_action, idle with a stop reason).
  • Message and tool-call updates are keyed upserts patched by id.
  • Notices and compaction updates are capability-free.
  • The client filesystem and terminal surface is gone; tooling arrives through the harness or a forwarded MCP server.

See the support matrix for the per-area comparison.

Negotiation​

Everything optional is settled at initialize, and both sides treat an omitted capability as unsupported.

  • Client capabilities — fs.read_text_file, fs.write_text_file, terminal. These decide which client.* tools exist at all.
  • Agent capabilities — loadSession, the session lifecycle (list, close, resume, delete), prompt image content, and HTTP MCP. Under v2 these are object-valued and nested under session; session.fork is draft-gated.
  • Unstable features — advertised by the client in the capability _meta under keys such as unstable_session_fork, unstable_session_compaction, and unstable_session_notices. Tackle sends RFD-shaped updates only to clients that advertise them, and always has a stable-variant fallback.

_meta is the protocol's extension point: implementations must not assume anything about values at those keys, which is what makes feature-gated additions safe.

Forwarded client RPC tools​

When the client advertises its file-system and terminal surface, tackle reflects it to the model as client.* tools:

ToolUnderlying RPC
client.fs.read_text_filefs/read_text_file
client.fs.write_text_filefs/write_text_file
client.terminal.createterminal/create
client.terminal.outputterminal/output
client.terminal.wait_for_exitterminal/wait_for_exit
client.terminal.killterminal/kill
client.terminal.releaseterminal/release

Nothing is authored: the RPC fixes the parameters, so the harness ships no schemas beyond the wire types. A tool exists only when both hold — the client advertised the capability, and the category is enabled ([client_tools], seeded at startup, toggled at runtime with /editor).

Terminals are connection-scoped and ephemeral. The harness tracks the ids it created for a session and best-effort releases them at session/close. A stale id — reaped by the editor, or lost across a restart — fails the call precisely rather than silently. No terminal state is persisted or reconciled across restarts.

Model calls to these tools pass through the normal permission pipeline; direct invocation with /! does not, as the user is the authority.

Forwarded MCP servers​

A client such as Zed forwards its own configured MCP servers in the session request. Those servers join tackle's own mcp_servers for the connection, and the client's entry wins on a name collision — the shadowed config server is reported in the first-turn status. Tools from both are namespaced mcp.<server>.<tool>.

Requests to the client​

  • session/request_permission — the ask fallback. No timeout is imposed; cancellation is the only non-selection outcome. MCP elicitations are forwarded as elicitation/create when the client advertises a mode and never write the grant store.
  • Client-capability RPCs — the client.* tool calls above.
  • fs/* and terminal/* — only ever as a consequence of a model tool call or a direct invocation.

Notifications to the client​

Streamed during a turn: user and agent message chunks, thought chunks, tool_call and tool_call_update, and usage_update after each model request. Around a turn: session_info_update for updatedAt, and available_commands_update for the command list.

Capability-gated: notice updates (unstable), and RFD-shaped compaction updates (unstable). Both degrade to stable equivalents — an agent message and a usage update — for clients that do not advertise them.

Under v1 the turn's terminal state rides the session/prompt response as an ACP stopReason. Under v2 the response is the insertion receipt, and the terminal state rides an idle state_update with stopReason: end_turn, max_turn_requests, cancelled, or error.

Transports​

  • stdio — the default, one connection per process.
  • HTTP — an axum-based transport sharing the same handler chain.

Conformance​

The upstream Agent Client Protocol Test Compatibility Kit (acp-tck) is the external, requirement-level conformance suite. It runs against both protocol versions. It launches tackle as a stdio subprocess and drives initialize, the session lifecycle, prompt turns, streaming, and cancellation, reporting each requirement as pass, fail, skipped, or not tested under an overall verdict. acp-tck is pinned as a Nix flake input and runs against a deterministic local test model, so the check needs no network, credentials, or model provider.

The check is blocking and baselined per version. The MANDATORY failures in each report are compared against that version's committed baseline (baseline-1.txt, baseline-2.txt), which records the known gaps still to be burned down. Both baselines are currently empty. A new MANDATORY failure, a NOT CONFORMANT verdict, a version mismatch or auth block, or an advertised-capability failure makes the check exit non-zero and fails the CI job and the merge gate. Baseline ids that start passing, or that no longer appear in the report, are reported as drift and tolerated until the baseline is updated.

Run the whole check locally from inside nix develop:

just tackle conformance

The recipe builds tackle and the test model, starts and stops the test model, runs both version suites, writes target/conformance/report-<version>.json, and prints the verdict plus the baseline diff. To compare a report you already have without rerunning the suite, use just tackle check-baseline <version>.

To update a version's baseline, review the failures in the latest report and regenerate it:

just tackle seed-baseline <version>

Then review the diff to baseline-<version>.txt and commit it. The seeded file reflects the current failures; confirm each new id is a gap you intend to tolerate, and drop ids whose requirements now pass.

The in-repo golden-transcript suite (cargo test -p agentkit-tackle acp_v1_conformance) remains the fast, focused protocol regression check; acp-tck is additive and does not replace it. Both versions report CONFORMANT; the baselines are empty.