fix(acp): publish completed streamed replies - #7249
Open
mujtabachang wants to merge 2 commits into
Open
mujtabachang wants to merge 2 commits into
mujtabachang wants to merge 2 commits into
Conversation
Capture the final ACP assistant segment and publish it through the harness when an end_turn completes without an existing agent-authored reply. Bound captured output, preserve human-facing thread routing, suppress explicit silence markers, and reconcile uncertain relay acknowledgements. Signed-off-by: Ahmed Mujtaba <mujtabachang@gmail.com>
🔐 Codex Security Review
|
Do not publish captured text in the control-signal completion race because the dropped prompt future also loses the actual ACP stop reason. Avoid a clone-on-copy lint and clarify DM routing while here. Signed-off-by: Ahmed Mujtaba <mujtabachang@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent_message_chunkupdatesend_turncompletes without an existing agent-authored replyRoot cause
buzz-acpconsumed ACP assistant chunks only for tracing. Agents such as Hermes can complete a turn withstopReason: end_turnbut cannot use the Buzz CLI because the terminal environment intentionally omitsBUZZ_*credentials. Their completed text therefore never became a kind-9 reply.The harness already owns the signing keys, so this change adds a delivery fallback at that existing credential boundary. It runs only for successfully completed human-facing turns and checks the relay for an agent-authored reply before publishing, avoiding duplicate replies from agents that did use the normal tool path.
Tests
Added regression coverage for:
Static whitespace validation passed with
git diff --check. The local scratch environment did not contain the repository toolchain, socargo fmt, Clippy, and unit tests are delegated to this PR's CI.No UI changes.
Related work
Closest overlapping implementation: #5811. This PR incorporates its review feedback by bounding memory, publishing only on
end_turn, checking for an existing reply, preserving routing, requiring relay acceptance, reconciling uncertain sends by event ID, and never rerunning the model/tool turn.Also reviewed #3883 and the closed #2681 while investigating the recurrence.
Fixes #4923