buzz-acp subscribe=all delivers typing/presence events to agents: token burn per keystroke and false typing badge
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
### Summary
When buzz-acp runs with `BUZZ_ACP_SUBSCRIBE=all` and no `BUZZ_ACP_KINDS` override, ephemeral events are delivered to the agent session. Every typing indicator (kind 20002) and presence update (kind 20001) wakes the agent and starts a turn. Two effects:
1. Token cost per keystroke. Each wake-up is a model call even when the agent decides to do nothing. A human composing one message produces dozens of typing events, so the agent pays for dozens of no-op turns.
2. A confusing feedback loop in Desktop. While the agent processes the wake-up, Desktop shows it as typing (the working badge in `desktop/src/features/agents/agentWorkingSignal.ts` falls back to bot typing signals and active turns). The human sees "agent is typing" whenever they themselves type, before the agent has anything to say.
### Reproduction
1. Run buzz-acp with `BUZZ_ACP_SUBSCRIBE=all` (the documented way to make an agent respond to un-mentioned channel messages) and leave `BUZZ_ACP_KINDS` unset.
2. Open the channel in Desktop as a human member and start typing a long message.
3. Watch the agent flip to "typing..." while you type, and watch the harness logs record a turn per typing event.
### Expected
Ephemeral kinds (20001, 20002, and arguably 24200 observer frames) should never reach the agent subprocess, or at minimum should be excluded by default when `subscribe=all` resolves with no kinds override. Mentions mode already ships a curated default (`resolve_channel_filters` in `crates/buzz-acp/src/config.rs` uses KIND_STREAM_MESSAGE, KIND_WORKFLOW_APPROVAL_REQUESTED, KIND_STREAM_REMINDER); All mode passes `kinds: None` and subscribes to everything.
### Workaround
Set an explicit allowlist, for example:
```
BUZZ_ACP_KINDS=9,40002,40003,5,7,1059,40100,40007,46010,46020
```
This keeps messages, edits, deletions, reactions, DMs, canvas updates, reminders, and workflow events while dropping the keystroke echoes. Confirmed working on a self-hosted deploy (compose stack from `deploy/compose`).
### Suggested fix
In `resolve_channel_filters`, give `SubscribeMode::All` a default exclusion of ephemeral kinds when `kinds_override` is `None`, or introduce a small default allowlist mirroring the mentions-mode one plus reactions and canvas. Happy to send a PR if maintainers agree on the direction.
Contributor guide
Research direction
Start in crates/buzz-acp/src/config.rs at resolve_channel_filters, comparing the mentions-mode defaults with SubscribeMode::All when kinds_override is unset. Reproduce with BUZZ_ACP_SUBSCRIBE=all and inspect harness logs while typing in Desktop; done means ephemeral events no longer start agent turns and the agent-working badge no longer appears for human typing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100