Files
tai/research/cap-protocol/acp-cancellation.md
T
retoor cc1c130b51 CAP protocol both directions: agent speak plus orchestrator drivers (1.39.0)
- Agent side: --cap-manifest plus --cap-speak stream-json binding with
  transcript-diff frames, diff/transcript artifacts, session config
- Orchestrator: PTY driver (settle heuristics on PtyProc/TuiVtScreen),
  stream-json, ACP-stdio (permission/elicit/fs/terminal serving) and
  A2A drivers (dual draft/current spelling, SSE mapping)
- Sessions, fleets: worktrees, master plans, mediated routing,
  budget refusal, audit log, research auto-answerer, --cap CLI
- cap.md contract with drift tests; research/cap-protocol archive
- Suites 1119 + 16 green
2026-10-18 13:17:35 +02:00

1.9 KiB

ACP cancellation ($/cancel_request, -32800)

Metadata

Field Value
Institute Molodetz Institute — Research & Retrieval Division
Subject cap-protocol
Document type Source Dossier
Tier 1
Source title ACP Cancellation
Source URL https://agentclientprotocol.com/protocol/v1/cancellation.md
Source type specification
Source date (published) Unknown, not stated (living docs)
Date researched 2026-10-18
Researched by tai (agent), model: Muse Spark, on behalf of retoor
Research method direct page fetch, read in full (75 lines)
Confidence High
Status Active

Summary

$/cancel_request notification cancels any JSON-RPC request; the callee MUST answer the original request (valid response or -32800 Request Cancelled). Prompt turns ALSO have session/cancel, under which the client MUST answer pending permission requests with cancelled and the agent MUST end the prompt with stop reason cancelled.

Key findings

  • Two-level cancel: generic $/cancel_request for any request, plus turn-scoped session/cancel with stricter MUSTs; tai's driver needs both (turn cancel maps from cap.cancel scope current_turn).
  • Cascading cancel is illustrated but explicitly optional: no automatic propagation guarantee.
  • Internal cancellation (either side) SHOULD surface as the same -32800, keeping one code path.

Pros / strengths

  • Clean separation of generic vs turn cancel; the worked cascade example removes sequencing doubt.

Cons / limitations / caveats

  • $/cancel_request support is optional per implementation; tai must handle agents that ignore it (timeout + kill).

Relevance to tai

Cancel mapping for the ACP driver: cap.cancel to session/cancel (+ $/cancel_request for in-flight requests), with timeout fallback.

Changelog

Date Change
2026-10-18 Initial dossier created.