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.

@rian010194

Copy link
Copy Markdown

Tested successfully on Windows 11 with Buzz Desktop 0.5.3 and Hermes Agent 0.18.2.

Setup:

  • Hermes connected through buzz-acp
  • OpenRouter/Nemotron coordinator
  • Owner-only managed agent
  • Single agent instance

Before this patch, Hermes completed the turn with a plain ACP assistant response and zero tool calls, but nothing appeared in the Buzz channel.

I built buzz-acp from Desktop v0.5.3 with commits a8ab9e46 and ff34b9c6. In the live test:

  • Hermes completed with text_response
  • tool_turns=0
  • buzz_acp::pool logged: content-delivery fallback: posted undelivered agent content as channel reply
  • The expected response appeared in the correct Buzz channel
  • No Buzz private key was copied into the Hermes profile
  • No custom MCP publishing bridge was required
  • The focused fallback tests passed on Windows

This fixes the silent-reply failure for the Hermes ACP runtime in a real managed Buzz Desktop setup.

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

3 participants