fix(acp): preserve interrupted responses - #84
Conversation
There was a problem hiding this comment.
Re-review of the latest head found no new issues. Both prior findings remain valid: the refreshed AgentKit pin does not bound the cancellation-only streamed-content accumulator, and although the new commit is now reachable from feat/acp-v2-session-inject, it remains unsigned post-release code identified as agentkit-loop 0.10.11 rather than a distinct checksummed release.
There was a problem hiding this comment.
Re-review of the latest head found no new issues. The interrupted-response buffer finding is addressed by AgentKit commit 7604f6c, which caps retention at 1 MiB and 256 parts, releases buffered content on overflow, and resets the budget on supersession. That prior thread is resolved. The remaining release-integrity finding is still valid and remains unresolved because the selected code is still unsigned, non-checksummed git source labeled agentkit-loop 0.10.11.
Summary
Preserve partial ACP v2 assistant responses when users interrupt a turn, and retain that partial response in model context for the next turn.
Motivation
Interrupted turns currently replace streamed output with empty content and omit the partial assistant response from subsequent model context. This leaves a blank, unfinished UI entry and breaks conversational continuity.
Impact
Interrupted ACP v2 turns keep the response content streamed before cancellation. Retry attempts that are explicitly superseded continue to clear stale output before rendering their replacement.
Technical details
Distinguish cancellation from supersession
Only
ResponseAttemptSupersededclears provisional ACP messages. Ordinary cancellation preserves the current message and thought chunks.Preserve interrupted model context
The AgentKit revision records streamed partial assistant content in the cancelled turn result and transcript, resets it on supersession, and processes supersession before concurrent cancellation.
Track the maintained AgentKit branch
Both
agentkit-acpandagentkit-loopare pinned to commit6480d90on the maintainedfeat/acp-v2-session-injectbranch so the ACP and loop implementations resolve from one durable source revision.