Skip to content

Commit 8baed7a

Browse files
tlongwell-blocknpub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dTyler Longwell
authored
feat(agents): lower default agent parallelism from 24 to 10 (#3038)
## What One-line default change: `DEFAULT_AGENT_PARALLELISM` 24 → 10 (`desktop/src-tauri/src/managed_agents/types.rs`), requested by Tyler in [buzz-generic-acp-harnesses](buzz://message?channel=d6d84fdc-47fe-4e41-acf5-a08a4a013e6b&id=a047ead3a34ba804c376bf79f29e355d304162a88c7b2a7121e092547c572022). ## Why Each unit of parallelism is a **full agent subprocess** per agent × community pair, spawned eagerly and serially at create/start before the harness connects to the relay: - At 24, a desktop with a few dozen agent×community pairs carries >1,000 potential idle subprocesses. - Slow-starting harnesses (OpenClaw measured at 4–10s per worker) take minutes to create, and messages sent during that window can be permanently missed (the startup watermark is captured only after eager pool init). - Parallelism is per-channel concurrency — a channel never uses more than one worker — so 10 still covers concurrent-channel fan-out for typical agents. Context: verified RCA + live 1-worker/3-mention experiment in the same thread. Demand-driven pool growth (seed 1, grow on contention up to the cap) is agreed as a follow-up; this is the interim risk reduction. ## Scope / blast radius - Existing agent records keep their persisted `parallelism` value — only new records and unset defaults change. - Per-agent override unchanged (1..=32 via agent editor / `BUZZ_ACP_AGENTS`). - Readers of the constant (`team_snapshot`, `personas/snapshot/import`, `commands/agents` mint path) all take the new default transitively; no other code pins 24. - `activeAgentTurnsStore.test.mjs` comments updated so the 24-turn eviction case is framed against the harness cap (32) instead of the default — coverage unchanged, no assertion touched. ## Verification At 63bb0c1, same shell: desktop Rust `cargo test --lib` 1693/0 (14 ignored) · JS suite 3523/3523 · tsc clean · biome clean on touched file · cargo fmt clean. Signed-off-by: Tyler Longwell <[email protected]> Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: Tyler Longwell <[email protected]>
1 parent 02ae946 commit 8baed7a

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎desktop/src-tauri/src/managed_agents/types.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ pub struct UpdateTeamRequest {
745745
pub const DEFAULT_ACP_COMMAND: &str = "buzz-acp";
746746
/// ~5 min (320s) — matches the CLI harness default (BUZZ_ACP_IDLE_TIMEOUT).
747747
pub const DEFAULT_AGENT_TURN_TIMEOUT_SECONDS: u64 = 320;
748-
pub const DEFAULT_AGENT_PARALLELISM: u32 = 24;
748+
pub const DEFAULT_AGENT_PARALLELISM: u32 = 10;
749749

750750
fn default_agent_parallelism() -> u32 {
751751
DEFAULT_AGENT_PARALLELISM

‎desktop/src/features/agents/activeAgentTurnsStore.test.mjs‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ describe("activeAgentTurnsStore", () => {
157157
// Mirrors the store's private cap: the harness's hard upper bound on
158158
// parallel agent subprocesses (`--agents` accepts 1..=32).
159159
const CAP = 32;
160-
/** Desktop's default harness parallelism (DEFAULT_AGENT_PARALLELISM). */
160+
/** Desktop's former default harness parallelism; still a legitimate
161+
* per-agent turn count (any value up to the harness cap of 32 is valid,
162+
* regardless of DEFAULT_AGENT_PARALLELISM). */
161163
const DEFAULT_PARALLELISM = 24;
162164
const EPOCH = Date.parse("2024-01-01T00:00:00Z");
163165
const at = (ms) => new Date(EPOCH + ms).toISOString();
@@ -188,9 +190,10 @@ describe("activeAgentTurnsStore", () => {
188190
assert.ok(channels.has(`c${CAP + 1}`));
189191
});
190192

191-
it("tracks every turn of a default-parallelism agent working in 24 channels", () => {
192-
// DEFAULT_AGENT_PARALLELISM is 24, so a single agent legitimately runs 24
193-
// concurrent turns. Every one must keep its working badge.
193+
it("tracks every turn of a high-parallelism agent working in 24 channels", () => {
194+
// Parallelism up to the harness cap (32) is user-configurable, so a
195+
// single agent can legitimately run 24 concurrent turns. Every one
196+
// must keep its working badge.
194197
syncAgentTurnsFromEvents(AGENT, startTurns(DEFAULT_PARALLELISM));
195198
const channels = channelIdsOf(getActiveTurnsForAgent(AGENT));
196199
assert.equal(

0 commit comments

Comments
 (0)