block / block/buzz

Misleading error: "all N agents failed to start" counts harness subprocesses, not Buzz agents

Open
#3,338 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

**Describe the bug**

When a single agent's harness pool fails to start, `buzz-acp` aborts with:

```
Error: all 24 agents failed to start — cannot continue
```

The word "agents" here means `BUZZ_ACP_AGENTS` — the count of harness subprocesses *within one agent*. But "agent" is also Buzz's primary user-facing noun for a configured, named agent. So the message reads as "24 of your agents failed", when the real meaning is "one agent failed to start its 24 harness subprocesses".

This is actively misleading during diagnosis. In my case exactly one agent was misconfigured; the other agents in the workspace were healthy and running. The message sent me looking for a fleet-wide fault for several rounds before I found that every error in the batch came from a single agent's log file.

The interleaved per-slot errors compound it, because they're also indexed by "agent":

```
ERROR buzz_acp: agent initialize failed: Agent process exited unexpectedly agent=22
ERROR buzz_acp: agent initialize failed: Agent process exited unexpectedly agent=23
Error: all 24 agents failed to start — cannot continue
```

Nothing in the output indicates these indices are slots inside one agent rather than distinct agents.

**Source**

`crates/buzz-acp/src/lib.rs:3826-3831` at tag `v0.5.0`:

```rust
let live_count = agent_slots.iter().filter(|slot| slot.is_some()).count();
if live_count == 0 {
return Err(anyhow::anyhow!(
"all {} agents failed to start — cannot continue",
startup.agents
));
```

`startup.agents` is the `BUZZ_ACP_AGENTS` pool size (`config.rs`: `env = "BUZZ_ACP_AGENTS", default_value_t = 1`, range 1..=32).

**Steps to reproduce**

1. Configure an agent whose harness command fails at startup (any command that exits non-zero works).
2. Set that agent's parallelism to something greater than 1.
3. Start the agent.
4. Observe the error text.

**Expected behavior**

Wording that distinguishes harness subprocesses from Buzz agents, and that names which agent failed. Something like:

```
all 24 harness processes failed to start for agent — cannot continue
```

The per-slot `agent=N` field would be clearer as `slot=N` or `worker=N` for the same reason.

**Version and platform**

Buzz Desktop v0.5.0, macOS (Apple Silicon). Line numbers verified against the `v0.5.0` tag.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.