Skip to content

Commit 64b8dcd

Browse files
author
Michael Feth
committed
Revert "feat(agent): default the reply guard on"
This reverts 20a6763 on this branch only. The change now lives in its own PR, block#6118, where it can be reviewed as what it is: a product-default change to the buzz-agent binary affecting self-hosted deployments. It does not belong here. This PR is about circuit-breaker alerting and workflow visibility, and its own description argued against flipping this default — a reviewer reading the body and then the diff found them in direct contradiction. The flip was also incomplete as carried here. reply_guard_off_by_default (crates/buzz-agent/tests/regressions.rs) spawns with no env override and asserts exactly one LLM call, documented as the invariant that keeps the guard free for anyone who has not opted in. Flipping the default without inverting that test leaves cargo test -p buzz-agent red. block#6118 carries the inversion, along with the two comments that documented the old policy. No behaviour change to the circuit-breaker work in this PR. Co-authored-by: Michael Feth <[email protected]> Signed-off-by: Michael Feth <[email protected]>
1 parent 1269367 commit 64b8dcd

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎crates/buzz-agent/README.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,24 +164,24 @@ Everything is environment variables. No flags, no config files. (We are a subpro
164164
| `BUZZ_AGENT_MAX_LINE_BYTES` | `4194304` | 4 MiB. Hard cap on inbound JSON-RPC frames. |
165165
| `BUZZ_AGENT_MAX_HISTORY_BYTES` | `1048576` | 1 MiB. Old turns are evicted past this. |
166166
| `BUZZ_AGENT_MAX_TOOL_RESULT_TEXT_BYTES` | `51200` | 50 KiB. Per-result cap on tool-output text; oversize is middle-elided (head + tail kept) with an inline marker. Images are exempt. |
167-
| `BUZZ_AGENT_REQUIRE_REPLY` | `1` | `0` disables the [reply guard](#reply-guard) — remind the model to publish when a turn is about to end with nothing posted to Buzz. |
167+
| `BUZZ_AGENT_REQUIRE_REPLY` | `0` (`1` on mesh) | `1` enables the [reply guard](#reply-guard) — remind the model to publish when a turn is about to end with nothing posted to Buzz. Desktop defaults it to `1` for Buzz shared-compute agents. |
168168

169169

170170
## Reply Guard
171171

172-
On by default. A turn that is about to end without any recognized attempt to
173-
post to Buzz gets a reminder that its assistant text is invisible to humans,
174-
and is rerolled.
172+
Off by default, except on Buzz shared-compute (mesh) agents, where Buzz Desktop
173+
sets `BUZZ_AGENT_REQUIRE_REPLY=1` automatically. With it enabled, a turn that is
174+
about to end without any recognized attempt to post to Buzz gets a reminder that
175+
its assistant text is invisible to humans, and is rerolled.
175176

176177
This exists because a Buzz agent's reasoning and tool output are not shown to
177178
anyone. A turn that does real work and never posts is a silent failure — the
178179
requester waits on a result that was produced and thrown away.
179180

180-
Setting `BUZZ_AGENT_REQUIRE_REPLY=0` on the agent, persona, or global env opts
181-
out. Buzz shared-compute (mesh) agents also always get it via Desktop's
182-
`insert_default_if_unset`, which never overrides an explicit value — so an
183-
agent, persona, or global `BUZZ_AGENT_REQUIRE_REPLY=0` still opts a mesh agent
184-
out even though the binary's own default now agrees with it.
181+
Mesh agents get it by default because they run on small local models, which are
182+
the ones most likely to do the work and then end the turn without publishing it.
183+
Setting `BUZZ_AGENT_REQUIRE_REPLY=0` on the agent, persona, or global env opts a
184+
mesh agent back out; the default never overrides an explicit value.
185185

186186
**Advisory, never a trap.** At most two reminders, then the turn ends whether or
187187
not anything was published. The guard catches accidental omission; it does not

‎crates/buzz-agent/src/config.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,8 @@ pub struct Config {
484484
/// disable `_Stop` hooks entirely (agent always honors end_turn).
485485
pub stop_max_rejections: u32,
486486
/// Remind the model to publish when a turn is about to end without any
487-
/// recognized attempt to post to Buzz. Default on; opt out per agent with
488-
/// `BUZZ_AGENT_REQUIRE_REPLY=0`.
487+
/// recognized attempt to post to Buzz. Default off; opt in per agent with
488+
/// `BUZZ_AGENT_REQUIRE_REPLY=1`.
489489
///
490490
/// Advisory only: at most `MAX_REPLY_NAGS` reminders (see `agent.rs`),
491491
/// then the turn ends regardless. Bounded by the same
@@ -624,7 +624,7 @@ impl Config {
624624
max_parallel_tools: parse_env("BUZZ_AGENT_MAX_PARALLEL_TOOLS", 8usize)?,
625625
hook_timeout: Duration::from_millis(parse_env("BUZZ_AGENT_HOOK_TIMEOUT_MS", 2500u64)?),
626626
stop_max_rejections: parse_env("BUZZ_AGENT_STOP_MAX_REJECTIONS", 3u32)?,
627-
require_reply: parse_env("BUZZ_AGENT_REQUIRE_REPLY", 1u8)? != 0,
627+
require_reply: parse_env("BUZZ_AGENT_REQUIRE_REPLY", 0u8)? != 0,
628628
hook_servers: parse_hook_servers_env("MCP_HOOK_SERVERS"),
629629
hints_enabled: parse_env("BUZZ_AGENT_NO_HINTS", 0u8)? == 0,
630630
thinking_effort: parse_thinking_effort(env("BUZZ_AGENT_THINKING_EFFORT").as_deref())?,

0 commit comments

Comments
 (0)