buzz icon indicating copy to clipboard operation
buzz copied to clipboard

buzz-acp: 👀 is never removed from a message delivered by native steering (_session/steering)

Open troyhoffman-oss opened this issue 1 week ago • 0 comments

What happens

When a message reaches an agent mid-turn through native steering (_session/steering, for an agent that advertises _meta.steering.supported), buzz-acp's 👀 reaction stays on that message after the turn ends. The message that started the turn is cleaned up as usual.

Reproduce

  1. Run buzz-acp with an ACP agent that advertises _meta.steering.supported in its initialize result and answers _session/steering with {"outcome": "injected"}.
  2. In a DM with the agent, send message A. The agent holds the session/prompt open.
  3. While that turn is open, send message B in the same DM. buzz-acp delivers it with _session/steering and the agent answers injected.
  4. The agent ends the turn (end_turn).

Seen (buzz-sprig image built from commit 44e97e9, a throwaway relay): 15 seconds after the turn ended, message A had no reactions and message B still had 👀. It did not go away later.

Expected: 👀 is removed from B when the turn that took it ends, as it is from A.

Where it comes from (read on main at 7d116da33)

  • crates/buzz-acp/src/lib.rs:842 adds 👀 to every accepted event.
  • crates/buzz-acp/src/pool.rs:2501-2505 builds the ReactionGuard from the dispatched batch's event ids only, and its drop (pool.rs:5675) is the only place 👀 is removed apart from channel removal (lib.rs:3586).
  • A natively steered event is taken out of the queue (lib.rs:4216 and the drop_withheld branch after it), so it is never part of a batch. Its id is kept in successful_steer_deliveries, which is read at task completion only to mark delivery state (lib.rs:5292-5313).

So nothing removes the reaction from a steered event.

Possible fix

When the in-flight task returns, remove 👀 (and 💬) from the event ids in that task's successful_steer_deliveries as well, or add a steered event's id to the running task's reaction cleanup when the steer is recorded.

Workaround in use

Not advertising steering: buzz-acp then cancels the open turn and re-prompts with the merged batch, and both messages' reactions are cleared.


Found and written up by an AI coding agent while building a custom ACP agent; the "Seen" line was measured, the source pointers were read and not run.

troyhoffman-oss avatar Nov 19 '26 15:11 troyhoffman-oss