--- id: 3ecd877b-de73-4afd-b328-b3ee99f5a1e3 type: solution title: "Agent swarm wave parallelism for Rust implementation with code review pass" tags: [claude-code, swarm, orchestrator, code-review, rust, sba-scout, workflow] importance: 0.6 confidence: 0.8 created: "2026-02-28T04:58:09.031652+00:00" updated: "2026-02-28T04:58:09.031652+00:00" --- # Agent Swarm Wave Pattern for Rust Implementation Used TeamCreate + Agent worktrees for parallel Rust implementation across 3 waves based on dependency graph. ## What Worked - **Wave parallelism** works well when tasks map to separate files (`types.rs`, `client.rs`, `importer.rs`, `sync.rs`) — no merge conflicts, each agent owns its file - **Full task descriptions** with column mappings and reference file paths let coders work autonomously with zero clarification needed - **All 7 coders produced compiling code on first try** — the thorough task specs paid off ## Problems Encountered - **Pane limit hit**: Got "no space for new pane" error when 6 idle agents from earlier waves were still alive. Shut down idle agents promptly between waves to avoid this. ## Code Review Caught Real Bugs 1. **Missing `#[serde(default)]` on 8 TeamData fields** — would cause runtime deserialization panics when API returns objects without those optional fields 2. **Dead `ApiError::Parse` variant** — `response.json()` returns `reqwest::Error` not `serde_json::Error`, making the Parse variant unreachable. Fix: use `response.text()` + `serde_json::from_str()` 3. **`import_all_cards` hard-failing** on first missing CSV — changed to resilient independent tries for each CSV ## Recommendation Always run a code review agent after implementation waves, especially for error handling and serde derives. The review ROI was high — caught 3 bugs that would have been runtime failures.