Desktop spawns managed agents with BUZZ_ACP_MULTIPLE_EVENT_HANDLING hard-coded to steer — no per-agent exposure
Component
desktop (managed agents) / buzz-acp
Summary
The runner supports four mid-turn delivery modes (crates/buzz-acp/src/config.rs, MultipleEventHandling): queue, steer (default), interrupt, owner-interrupt. The CLI flag and BUZZ_ACP_MULTIPLE_EVENT_HANDLING work fine when spawning buzz-acp manually.
But managed agents spawned by the desktop app cannot use any of this: the spawn path hard-codes the env (desktop/src-tauri/src/managed_agents/runtime.rs at ef2aa1a):
command.env("BUZZ_ACP_MULTIPLE_EVENT_HANDLING", "steer");
command.env("BUZZ_ACP_DEDUP", "queue");
It is unconditional, while the neighboring envs shown it being written deliberately key off record fields:
if let Some(idle) = record.idle_timeout_seconds {
command.env("BUZZ_ACP_IDLE_TIMEOUT", idle.to_string());
}
if let Some(max_dur) = record.max_turn_duration_seconds {
command.env("BUZZ_ACP_MAX_TURN_DURATION", max_dur.to_string());
}
So idle_timeout_seconds / max_turn_duration_seconds are exposed per agent, but the event-handling mode is not — there is no UI setting and no agent-record field, even though the mechanism clearly exists.
Impact
Managed agents are always subject to steering semantics: a @mention arriving mid-turn cancels the in-flight turn and merges (see also #5839 for the channel-scoped variant of this). Users who want queue semantics — never cancel, deliver the new message after the current turn — have no way to choose it for a managed agent.
Request
Expose multiple_event_handling as a per-managed-agent setting (like idle timeout and max turn duration already are), or at minimum a workspace-level default, and pass the chosen value into the spawn env instead of the hard-coded steer.
Verified against
commit ef2aa1a (fresh checkout of main). Happy to link a PR if maintainers agree with the shape.
+1, with data showing what steer costs in practice.
Setup: Buzz Desktop 0.5.28 on Linux, 4 desktop-hosted Claude agents (claude-agent-acp) that hand work to each other in threads, with session_policy: thread and the idle pool sleep raised to 4 h. With idle teardown out of the picture, every remaining session split was a mid-turn mention. In one day's sample, 8 splits:
- 6 happened at the exact second of
control signal sent to in-flight task … mode=Steer. The steer cancels the running turn and re-prompts in a new provider session. The re-prompt carries<what-you-were-working-on>(the original task message verbatim, not progress), the new message and recent thread context. Everything done in the turn up to that point is lost. - 2 happened after
busy-owner hold expired — forking fresh session on an idle worker. That hold is a fixed 10 s with no setting. - 7 of the 8 triggers were agent→agent mentions (one agent pinging another mid-turn); 1 was the human owner.
For agents that coordinate with each other, owner-interrupt is the mode you want: agent mentions queue into the same session until the turn ends, and the owner can still cut in. On our workload, turns run a median of 5.3 min (p90 27 min, 1,073 turns), so that's the typical wait for a queued agent ping.
We now force BUZZ_ACP_MULTIPLE_EVENT_HANDLING=owner-interrupt with a wrapper around the bundled buzz-acp. It works, but it has to be re-applied after every update, so a per-agent field (as proposed here) would remove the need. A setting for the busy-owner hold duration would also help.
Another case where this matters: a managed agent on Windows hit the steer frame-write crash from #8254 six times in two weeks, and we could not move it to queue because of the hard-coded steer described here. Details and timings are in https://github.com/block/buzz/issues/8254. A per-agent field would have let us work around it.