buzz-acp: --subscribe all wakes a full agent turn for every typing indicator (kind 20002) and reaction (kind 7)
Draft: buzz-acp: --subscribe all wakes a full agent turn for every typing indicator (kind 20002) and reaction (kind 7)
Component: buzz-acp (crates/buzz-acp), observed at desktop-v0.5.3 Severity: cost/latency — an order of magnitude of wasted agent turns in chatty channels
Summary
With BUZZ_ACP_SUBSCRIBE=all (and no kinds override), the relay REQ is emitted without a kinds filter (NIP-01 has no negative filter), so ephemeral events flow in — and filter.rs::match_event has no kind-class guard: an all rule has empty kinds (= wildcard), so kind-20002 typing indicators with empty content match, get queued, receive the 👀 reaction, and wake a full agent turn.
Measured on our deployment: one human message preceded by ~85 seconds of typing produced ~20 empty agent turns before the real one.
Notes from reading the crate:
- The harness is a producer of 20002/20001/7 but has no inbound consumer for any of them, so they can be dropped pre-wake with no loss.
- Observer control frames (kind 24200, also ephemeral) arrive on a dedicated subscription and are routed before
match_event, so a kind-class guard there cannot break them.
Suggested fix (minimal)
At the top of match_event: drop buzz_core::kind::is_ephemeral(kind) || kind == KIND_REACTION before rule matching. This keeps the wake policy in one module, covers all three subscribe modes, and sits before the queue push and the 👀 side effect (patching later, e.g. in queue::push, would still fire the reaction and can interact with in-flight steer signals).
We are running this patch locally and can PR it if you'd take it.
Confirmed the rejected-reaction failure mode on macOS ARM64 with BUZZ_ACP_SUBSCRIBE=all and no explicit kinds override, using a locally repaired 0.5.27 desktop runtime. This is additional evidence for the ephemeral-event part of this issue; the proposed patch below deliberately preserves stored kind-7 reactions.
Reproduction:
- Run a normal channel listener with Subscribe=All.
- Another channel participant publishes a typing indicator (kind20002).
- The event enters the agent's work queue, which automatically sends pickup 👀 and completion 💬 reactions against its ID.
- Both reactions are rejected with HTTP400:
invalid: reaction target event not found, because the ephemeral event was never stored.
On 2026-10-05, Buzz's prompt-context UI identified one received event as kind20002. Local reaction diagnostics recorded failed 👀 and 💬 reactions to that exact event ID at 15:23:16.554942 and 15:24:00.808871 UTC. A separate 15:13–15:15 UTC Railway sample contained eight kind-7 target-not-found rejections from the affected agent. Relay target validation is correct and should remain intact.
There is a second related nonpersistent input: relay-signed thread summaries (kind39005). They are fan-out-only overlays, also never stored, and can enter the same wildcard normal-channel listener.
Tested fix: drop kind39005 and is_ephemeral(kind) at normal WebSocket channel ingress, before replay cursor updates, deduplication, or queue forwarding. Observer-control and membership routing remain separate. This prevents these events from changing replay state as well as preventing spurious work/reactions.
Patch: https://github.com/shanemhamilton/buzz/pull/5
Exact head: 1f6adb0211d1a36d1d48206a56cfa3b379be446b
Focused CI: https://github.com/shanemhamilton/buzz/actions/runs/37329953385
CI passed seven HTTP regressions, signed thread-summary exclusion, signed typing and both ephemeral-range boundary exclusions, duplicate-delivery/replay-state checks, an ordinary stored-message positive control, formatting, clippy, and an ARM64 release build. Independent exact-head review approved the patch. The fork PR is stacked on a separate HTTP-retry repair; the ingress changes are in commits 47eee6124dc2a74a8276b223336928523d2bdf75 and 1f6adb0211d1a36d1d48206a56cfa3b379be446b.
The verified repair is now running on two Macs. A bounded post-activation sample contained 142 successful HTTP bridge requests and no new rejected reactions, but no affected-agent reactions occurred in that window, so this is rollout verification rather than proof of a live reaction-path exercise. Broader repository CI is not claimed green.