Skip to content

fix(acp): deliver plain-text replies when send is skipped - #3883

Draft
nimittamatram07-lab wants to merge 2 commits into
block:mainfrom
nimittamatram07-lab:agent/acp-reply-fallback
Draft

fix(acp): deliver plain-text replies when send is skipped#3883
nimittamatram07-lab wants to merge 2 commits into
block:mainfrom
nimittamatram07-lab:agent/acp-reply-fallback

Conversation

@nimittamatram07-lab

@nimittamatram07-lab nimittamatram07-lab commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Fixes silent conversational turns from ACP runtimes that return assistant text
without explicitly calling buzz messages send.

  • Buffers agent_message_chunk text for the current ACP turn.
  • On a successful EndTurn, posts buffered text as a harness-signed threaded
    kind-9 reply when no publish delivery was confirmed.
  • Tracks publish candidates through their terminal tool outcome, so failed or
    cancelled sends leave the fallback armed while successful sends suppress it
    and avoid duplicates.
  • Does not post partial output from truncated/aborted turns, heartbeats without
    a reply target, or bare acknowledgements.
  • Keeps signing credentials in buzz-acp; the child runtime never needs the
    Buzz private key.

This rebases and adapts the approach from #2681 onto current main, preserving
the original contributors in the commit trailers and resolving the intervening
turn-lifecycle changes.

Related issue

Closes #2698.

Related implementation: #2681.

Testing

Passed:

  • cargo fmt --all -- --check
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • cargo test -p buzz-acp — 668 passed, 0 failed
  • cargo build --release -p buzz-acp
  • Full just ci stages through:
    • workspace formatting and strict Clippy
    • Desktop checks and Rust Clippy
    • Web checks
    • mobile formatting and analysis
    • Rust unit-test suite

Live end-to-end verification used an existing local Hermes ACP agent:

  • Trigger event:
    a59d58941f1fa83d4029aa3032308711d8a59b7fe52878f5620e4a330dca58f9
  • Harness-fallback reply:
    6cfcf56c2ee63029c90494dcc5f1cd04df0e4261648974a8f3d84964be87db29
  • Reply content: Existing Hermes connected securely.
  • The reply was signed by the existing agent identity, included the expected
    channel/root/reply tags, and produced no duplicate.

The repository-wide just ci run ultimately stopped in the pre-existing
Desktop scroll-test suite: multiple unchanged tests fail with
TypeError: act is not a function. This PR changes only
crates/buzz-acp/src/acp.rs and crates/buzz-acp/src/pool.rs; the focused
buzz-acp suite and all earlier repository-wide stages are green.

Buffer assistant message chunks for each ACP turn and publish them as a harness-signed threaded reply on EndTurn when no message delivery was confirmed. Keep the fallback armed after failed or cancelled sends, suppress duplicate delivery after a successful send, and skip bare acknowledgements.

Co-authored-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Co-authored-by: nimittamatram07-lab <258744135+nimittamatram07-lab@users.noreply.github.com>
Signed-off-by: nimittamatram07-lab <258744135+nimittamatram07-lab@users.noreply.github.com>
@Chessing234

Copy link
Copy Markdown
Contributor

plain-text fallback when send is skipped is useful. does the activity log still show the skipped send so operators can tell delivery was degraded?

Co-authored-by: nimittamatram07-lab <258744135+nimittamatram07-lab@users.noreply.github.com>
Signed-off-by: nimittamatram07-lab <258744135+nimittamatram07-lab@users.noreply.github.com>
@nimittamatram07-lab

Copy link
Copy Markdown
Author

@Chessing234 Good catch. The original patch emitted a harness WARN, but it did not add an explicit degraded-delivery item to the Desktop Activity feed. Fixed in ff34b9c: successful fallback delivery now emits a Delivery fallback activity item, while a fallback publish failure emits Delivery fallback failed with the reason. The full buzz-acp suite passes (668 tests), and strict Clippy is clean.

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.

[Bug] buzz-acp reply delivery is implicit — Sonnet-class agents answer in session text and every reply is silently dropped

2 participants