How do you run several agents in parallel?
30 posts
Playbook
Practitioners run several agents in parallel by using hierarchical model orchestration, isolated worktrees for task execution, or peer-to-peer communication protocols.
- Hierarchical model orchestration
Use a primary model like Opus to delegate specific coding tasks to sub-agents like DeepSeek , or use Sonnet 5.5 for background feature building in isolated worktrees while Haiku 5.5 handles telemetry at 340 tok/s and Opus 5.5 acts as a review supervisor . 15
- Worktree-based parallel execution
Execute tasks in isolated Git worktrees to prevent context bleed or branch collisions [4, 5], such as running 18 worktree executors alongside 2 planning and 2 review sessions . 245
- Peer-to-peer agent communication
Implement a flat multi-agent structure where agents communicate via a Unix socket and a BUN server using a protocol with tools to list, send commands, send prompts, and wait for responses . 3
- Defined loop management
Manage five to ten agents in parallel by setting clear stopping conditions, such as goal-based loops that stop after 5 tries , or using an orchestrator that wakes every 5 minutes to direct work . 910
- Specialized PR review
Deploy specialized agents to review pull requests, with 5 to 11 independent agents reviewing each PR for tasks like security scanning or accessibility . 8
Choosing between approaches
Hierarchical orchestration can be contrasted with flat peer-to-peer collaboration 3. Adding sub-agents may be unnecessary if a bloated system prompt can be fixed with skills or tool search instead 6.
Not covered yet
The material does not specify the maximum number of agents that can be run before performance degrades or resource limits are hit.
Posts
- Run long sessions per project with Opus delegating all work to DeepSeek sub-agentsdax runs long sessions per project and has Opus hand all the work to DeepSeek sub-agents.
- Run 22 Claude Code sessions in parallel: 18 worktree executors, 2 planning, 2 reviewA Mercari iOS engineer ran 22 sessions at once for the DS4 design system migration: 18 worktree execution sessions, 2 brain sessions that only handle discussion and progress, and 2 review sessions.

- Let Pi agents talk peer to peer over a Unix socket and a BUN serverIndyDevDan built a Pi to Pi extension for the Pi coding agent, where multiple agents communicate peer to peer through a Unix socket and a BUN server.

- Explore in parallel, implement once in an isolated worktree, then review in parallelDecoding AI Magazine proposes a multi-agent workflow: several agents explore in parallel and hand back only evidence, one agent implements in an isolated worktree, and several reviewers with different roles run in parallel before the results are synthesized.

- Run Sonnet in worktrees, Haiku for telemetry, and Opus as review supervisorThe author configures Claude Code to orchestrate parallel coding tasks using a specific model hierarchy.

- Fix a bloated prompt with skills and tool search before adding another sub-agentAddy Osmani says a bloated system prompt is often the real problem and suggests fixing it with skills and tool search rather than splitting context.

- Treat sub-agent orchestration as a distributed system to fix failure modesGirish Konda from Microsoft maps common sub-agent failures, such as duplicate side effects and hallucinated facts, to distributed-systems concepts.

- Scale multi-agent organizations by reducing roles to four basic actionsmeya.

- Levi Strauss built 17 specialized agents across the SDLC, with 5 to 11 reviewing each PRLevi Strauss built 17 specialized agents on the GitHub Copilot custom-agent platform, covering requirements, specs, testing, security scanning, accessibility checks and deployment, connected through MCP to Jira, Confluence and New Relic.

- Run five to ten agents in parallel with clear stopping conditionsAddy Osmani describes managing five to ten agents simultaneously, delegating tasks only when stopping conditions and constraints are well defined.

- Wake Codex every 5 minutes to steer parallel repo maintenance threads
- Run spec and tickets through parallel subagents for autonomous implementation
- Software factory: one worktree per feature and a Greptile score gate before merge
20 more posts to see