Skip to content

Commit 63bb0c1

Browse files
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dTyler Longwell
andcommitted
feat(agents): lower default agent parallelism from 24 to 10
Each unit of parallelism is a full agent subprocess per agent x community pair, spawned eagerly at create/start. At 24, a desktop with a few dozen pairs can carry over a thousand potential idle subprocesses, and slow- starting harnesses (e.g. OpenClaw at 4-10s per worker) take minutes to create because the pool initializes serially before the relay connects. 10 still covers concurrent-channel fan-out for typical agents (parallelism is per-channel concurrency; most agents are active in far fewer than 10 channels at once) while cutting the eager startup cost and idle process fleet by more than half. Existing records keep their persisted value; only new records and unset defaults are affected. Per-agent override is unchanged (1..=32 via the agent editor). Demand-driven pool growth (seed 1, grow on contention) is tracked as a follow-up. Test comments in activeAgentTurnsStore.test.mjs updated: the 24-turn case is now framed against the user-configurable harness cap (32) rather than the default, so the test keeps its coverage without pinning the default. Co-authored-by: Tyler Longwell <[email protected]> Signed-off-by: Tyler Longwell <[email protected]>
1 parent 1a56b7c commit 63bb0c1

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)