buzz-acp: a panicked agent's dead-lettered batch is discarded with no notice to the channel
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
When an agent task panics, `recover_panicked_agent` requeues the batch and discards the result:
```rust
// Dead-letter on exhaustion is logged inside requeue(); a
// panic path has no outcome to report, so no notice here.
let _ = queue.requeue(batch);
```
`EventQueue::requeue` returns `Some(batch)` when the retry budget is exhausted. On the normal error
path in `handle_prompt_result` that return value is captured and `spawn_failure_notice` posts the
familiar warning to the channel:
> ⚠️ I couldn't process the last request after multiple retries (...). Please re-send if it's still needed.
On the panic path it is dropped, so the events are discarded and whoever sent them sees nothing at
all. The channel just goes quiet.
The asymmetry looks unintended rather than deliberate. The comment says a panic has "no outcome to
report", but the dead-lettered batch **is** the outcome, and it carries the channel id and thread
tags the notice needs.
Scope: this is only about the missing notification on the panic path. It is not another attempt at
the dead-session recovery problem, which is already covered by other open PRs.
Happy to send a PR that threads the existing `RestClient` through and reuses `spawn_failure_notice`.
Contributor guide
Assessment
This issue has not been assessed yet.