// Coordinate concurrent task execution through agent delegation. Plan independent work, manage dependencies, and execute multiple agents simultaneously. Use when handling multiple unrelated tasks, research investigations, or layer-based implementations that can run concurrently.
| name | Executing Work in Parallel |
| description | Coordinate concurrent task execution through agent delegation. Plan independent work, manage dependencies, and execute multiple agents simultaneously. Use when handling multiple unrelated tasks, research investigations, or layer-based implementations that can run concurrently. |
Parallel execution prevents context saturation and accelerates work through concurrent processing. Key principle: implement shared dependencies first, then launch independent agents simultaneously.
Step 1: Shared Dependencies Implement first alone (shared types, interfaces, schemas, core utilities). Never parallelize theseâthey block other work.
Step 2: Parallel Execution
Use single function_calls block with multiple Task invocations:
<function_calls>
<invoke name="Task">
<parameter name="description">First parallel task</parameter>
<parameter name="subagent_type">appropriate-agent</parameter>
<parameter name="prompt">Detailed context and instructions...</parameter>
</invoke>
<invoke name="Task">
<parameter name="description">Second parallel task</parameter>
<parameter name="subagent_type">appropriate-agent</parameter>
<parameter name="prompt">Detailed context and instructions...</parameter>
</invoke>
</function_calls>
Step 3: Wait and Reassess Let agents complete, then:
Step 4: Repeat Continue batching until complete.
Stage 1: Database schema + Type definitions + Core utilities
Stage 2: Service layer + API endpoints + Frontend components
Stage 3: Tests + Documentation + Configuration
Stage 1: Independent feature implementations
Stage 2: Integration points between features
Stage 3: Cross-cutting concerns
Stage 1: Multiple research agents investigating aspects
Stage 2: Consolidation and planning from findings
Stage 3: Parallel implementation of requirements
â Provide complete context
â Use appropriate agents
programmer â API, services, data layers, components, pages, stylingExplore â Semantic searches, flow tracingsenior-engineer â Testing and verificationorchestrator â Complex multi-agent workâ Respect dependencies
| Metric | Threshold |
|---|---|
| Minimum tasks to parallelize | 2 independent tasks |
| Optimal group size | 3-5 independent tasks |
| Maximum concurrent agents | 7-8 (diminishing returns) |