Files
buzz/crates
Michael Neale 1fe074bc73 fix(acp): deliver plain-text replies when the model skips the send tool
buzz-agent's output is its tool calls; streamed assistant content is
observability-only and normally never posted. Capable models reliably call
`buzz messages send`, but weaker local models (e.g. via Buzz shared compute)
often answer a conversational prompt in plain content and never call the send
tool, silently dropping the reply.

Add a content-delivery fallback in buzz-acp: track per-turn whether the model
published its own message and buffer streamed content; on a normal turn end
with content but no publish tool call, post that content as a threaded kind-9
reply (reusing buzz_sdk::build_message, signed with the agent keys, best-effort,
mirroring post_failure_notice). Skips bare acknowledgements the base prompt
forbids publishing.

Live-validated against a small Gemma on a real community: the fallback fires
when the model answers in prose and stays dormant when it calls the send tool.

Unit tests cover send-tool detection (incl. read-vs-send discrimination) and
bare-ack filtering.
2026-07-23 15:29:15 +10:00
..