buzz-acp: 👀 is never removed from a message delivered by native steering (_session/steering)
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
- Run buzz-acp with an ACP agent that advertises
_meta.steering.supportedin itsinitializeresult and answers_session/steeringwith{"outcome": "injected"}. - In a DM with the agent, send message A. The agent holds the
session/promptopen. - While that turn is open, send message B in the same DM. buzz-acp delivers it with
_session/steeringand the agent answersinjected. - 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:842adds 👀 to every accepted event.crates/buzz-acp/src/pool.rs:2501-2505builds theReactionGuardfrom 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:4216and thedrop_withheldbranch after it), so it is never part of a batch. Its id is kept insuccessful_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.