Skip to content

fix(acp): preserve interrupted responses - #84

Merged
danielkov merged 4 commits into
mainfrom
fix/preserve-interrupted-response
Sep 2, 2026
Merged

fix(acp): preserve interrupted responses#84
danielkov merged 4 commits into
mainfrom
fix/preserve-interrupted-response

Conversation

@danielkov

@danielkov danielkov commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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 ResponseAttemptSuperseded clears 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-acp and agentkit-loop are pinned to commit 6480d90 on the maintained feat/acp-v2-session-inject branch so the ACP and loop implementations resolve from one durable source revision.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ACP cancellation behavior is internally consistent and its targeted tests pass. Two issues in the newly selected AgentKit loop source should be addressed before merging.

Comment thread Cargo.toml Outdated
Comment thread Cargo.lock Outdated

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. The changes look good to merge.

@danielkov
danielkov merged commit 661e513 into main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant