Repository navigation
feat(acp)!: replace injection with prompt delivery - #356
Conversation
|
@kit-code-agent review |
There was a problem hiding this comment.
Six findings: a rollover steer can return the wrong child turn’s output; a late withdrawal can disconnect unrelated Gateway sessions; Stop can leave a structured worker’s next prompt waiting on detached work; Desktop can lose audio playback and newer draft attachments; and generated Swift records the wrong schema revision.
Took 37 min
There was a problem hiding this comment.
An ordinary child prompt can return a rollover steer's result. Gateway can silently lose a withdrawal under writer backpressure or disconnect unrelated sessions when a withdrawal races close. Desktop can open changed source audio instead of the echoed bytes, and saved drafts can crowd out the transcript.
Took 22 min
There was a problem hiding this comment.
A later Stop can overtake an accepted withdrawal under Gateway backpressure. Nested ACP capture can silently drop output before the matching echo or disconnect sibling sessions when its provisional output budget fills. Desktop creates an unmanaged playback copy each time a user opens echoed local audio.
Took 17 min
There was a problem hiding this comment.
A pending withdrawal can consume Stop's last writer slot and disconnect unrelated Gateway sessions. Nested prompts can hang when a matching echo is followed by Idle without an observed Running state, or fail because of updates their result would discard. The Desktop playback cache can delete files it did not create and has no aggregate storage limit.
Took 10 min
|
@kit-code-agent review |
Summary
Replace Kit's legacy ACP injection RPCs with the draft v2 prompt-delivery modes proposed in agentclientprotocol/agent-client-protocol#1261. The runtime, gateway, TUI, and Desktop use
session/prompt.deliveryfor steering and queueing,messageIdto reconcile insertion, and$/cancel_requestto withdraw pending input.Impact
ACP callers must negotiate
capabilities.session.prompt.deliverybefore sending an explicit mode.session/cancelstops foreground work but preserves pending explicit steers and queued prompts. Ordinary prompts remain supported, and Kit's separate subagent steering mechanism is unchanged.Technical details
Gateway compatibility
The gateway forwards withdrawal using the resident child's request ID and retries under bounded write backpressure. The updated SDK preserves bounded HTTP/SSE and graceful HTTP
DELETEdrain. Kit uses one published SDK/schema dependency graph.