{"record":{"id":"43caaa0c8157a7e8","repo":"block/buzz","slug":"all-agents-failed-to-start-cannot-continue","errorCode":null,"errorMessage":"all {} agents failed to start — cannot continue","messagePattern":"all (.+?) agents failed to start — cannot continue","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"crates/buzz-acp/src/lib.rs","lineNumber":5550,"sourceCode":"                        acp.shutdown().await;\n                        agent_slots.push(None);\n                    }\n                    Err(_) => {\n                        tracing::error!(agent = i, \"agent timed out during init (60s)\");\n                        acp.shutdown().await;\n                        agent_slots.push(None);\n                    }\n                }\n            }\n            Err(e) => {\n                tracing::error!(agent = i, \"agent failed to spawn: {e}\");\n                agent_slots.push(None);\n            }\n        }\n    }\n    let live_count = agent_slots.iter().filter(|slot| slot.is_some()).count();\n    if live_count == 0 {\n        return Err(anyhow::anyhow!(\n            \"all {} agents failed to start — cannot continue\",\n            startup.agents\n        ));\n    }\n    if live_count < startup.agents as usize {\n        tracing::warn!(\n            \"started {}/{} agents — continuing with reduced pool\",\n            live_count,\n            startup.agents\n        );\n    }\n    tracing::info!(\"agent_pool_ready agents={}\", live_count);\n    Ok(AgentPool::from_slots(agent_slots))\n}\n\n// ── spawn_and_init ────────────────────────────────────────────────────────────\n/// Spawn an agent subprocess and run the MCP `initialize` handshake.\n///","sourceCodeStart":5532,"sourceCodeEnd":5568,"githubUrl":"https://github.com/block/buzz/blob/6c35e82bd50f4ad6587554eeb429e7378d474ba7/crates/buzz-acp/src/lib.rs#L5532-L5568","documentation":"Every configured agent subprocess failed to spawn: each failure is logged per-agent as 'agent failed to spawn: {e}' and leaves a None slot; when live_count is zero the harness aborts because there is nothing to serve traffic. Partial failure is tolerated with a 'continuing with reduced pool' warning — only total failure is fatal.","triggerScenarios":"The agent command/args in the harness startup config are wrong for every entry: nonexistent binary path, file not executable, exec format error (wrong arch/binary), or missing interpreter for a script command.","commonSituations":"Agent binary path changed after a reinstall or container image update; PATH not set in the service environment; config referencing a build artifact (./target/release/...) that was cleaned; exec-format mismatch on ARM hosts.","solutions":["Read the per-agent 'failed to spawn: {e}' log lines — they carry the OS-level cause (NotFound, PermissionDenied, Exec format error)","Run the configured agent command manually in the same environment and user context to reproduce","Fix the path/args/permissions in the agent startup config, or rebuild the missing binary","Confirm startup.agents matches the number of agent entries you actually configured"],"exampleFix":"# agent startup config\n# before\nagents:\n  - command: /usr/local/bin/buzz-agent-old\n# after\nagents:\n  - command: /usr/local/bin/buzz-agent\n    args: [\"--acp\"]","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\n# Preflight: every configured agent command must exist and be executable\nfor cmd in /path/to/agent-a /path/to/agent-b; do\n  [ -x \"$cmd\" ] || { echo \"agent binary missing or not executable: $cmd\" >&2; exit 1; }\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Smoke-test one agent spawn before starting the full pool; the harness logs each per-agent spawn error with the OS cause","Pin absolute binary paths in service environments rather than relying on PATH","Rebuild agent binaries after cargo clean or image updates, and re-deploy configs that reference target/ paths"],"tags":["buzz-acp","subprocess","spawn","agent-pool","config","startup"],"backgroundTag":"subprocess-spawn-failed","analyzedSha":"6c35e82bd50f4ad6587554eeb429e7378d474ba7","analyzedAt":"2026-08-20T04:38:24.874Z","contentChangedAt":"2026-08-20T04:38:24.874Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}