mirror of
https://github.com/block/buzz.git
synced 2026-11-01 15:01:12 +00:00
A turn that streams no assistant text and completes no tool call still reports `end_turn`, which the harness cannot distinguish from a real answer. The mention is dequeued as handled and the user is left waiting on a reply that will never come, with nothing to retry. `AcpClient` now records whether a turn produced anything, cleared at the top of every `session/prompt`. A channel turn that ends `end_turn` with the flag still clear is reported as a failure, so the batch flows through the existing backoff and dead-letter path instead of vanishing. Only successful work counts. buzz-agent reports a rejected tool call as `completed` with `rawOutput.isError` set, so counting bare `completed` would mask the exact turn this detects. Whitespace-only chunks are formatting and thought chunks are reasoning the user never sees, so neither qualifies. Heartbeats are exempt: they are self-prompts with no waiting user and nothing to requeue. The failure is application-class (`AgentError`) rather than a protocol error — the stdio pipe is intact and the process is healthy, so the agent returns to the pool instead of being respawned against the crash circuit. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>