Files
tai/research/cap-protocol/acp-prompt-turn.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

2.4 KiB

ACP prompt turn (session/update variants, stop reasons)

Metadata

Field Value
Institute Molodetz Institute — Research & Retrieval Division
Subject cap-protocol
Document type Source Dossier
Tier 1
Source title ACP Prompt Turn
Source URL https://agentclientprotocol.com/protocol/v1/prompt-turn.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 (590 lines)
Confidence High
Status Active

Summary

The prompt-turn lifecycle: session/prompt request, session/update notification variants (message/thought chunks, tool_call, tool_call_update, plan, usage_update, notice, compaction...), permission interleaving, cancel semantics, and the session/prompt response carrying the stop reason. Turn boundary = prompt RESPONSE, not a notification.

Key findings

  • Update variants map 1:1 onto CAP C.3 rows (agent_message_chunk, agent_thought_chunk, tool_call, tool_call_update, plan) plus extras tai can ignore or log (notices, compaction, slash commands).
  • messageId groups chunks into messages (opaque, agent-chosen); a changed id means a new message.
  • Clients MUST restrict prompt content types to negotiated prompt capabilities.
  • notice/compaction updates are capability-gated (absent capability means MUST NOT send); tai's driver advertises neither, keeping agents on plain messages.
  • Cancel: client sends session/cancel, MUST answer pending permission requests with cancelled outcome, agent MUST reply to the original prompt with stop reason cancelled.

Pros / strengths

  • Precise turn-boundary rule (response, not notification) eliminates the PTY-style guessing for ACP agents.
  • Capability gating lets a minimal driver stay minimal without breaking agents.

Cons / limitations / caveats

  • Long page with heavy component markup; schema-level field types live on the schema page (not fetched).
  • Compaction/notice semantics add client-side state tai deliberately declines via capabilities.

Relevance to tai

The C.3 mapping source for the ACP driver: update-variant to core-event table plus the prompt-response turn boundary.

Changelog

Date Change
2026-10-18 Initial dossier created.