Task Delegation
The delegate_task tool lets the agent spawn subagents to handle complex or parallel work. Each subagent runs in isolation with its own context.
When to use delegation
Delegation is useful for:
- Parallel research — “Research A and B simultaneously and compare them”
- Context-heavy tasks — Tasks that would produce too much output for the main context
- Isolated debugging — Debug sessions that explore many files
- Code review — Analyzing large diffs without flooding the conversation
How it works
When the agent delegates a task:
- A new subagent is created with a fresh conversation
- The subagent gets a focused goal and any relevant context
- It works independently with a restricted toolset
- Only the final summary is returned to the main conversation
The parent conversation never sees the intermediate tool calls or reasoning — just the result.
Restrictions
Subagents have some limitations to prevent runaway behavior:
- No recursive delegation — Subagents cannot spawn their own subagents
- No user interaction — Subagents cannot ask clarifying questions
- No memory writes — Subagents cannot modify MEMORY.md or USER.md
- No messaging — Subagents cannot send messages to other platforms
Parallel tasks
You can request parallel work:
Research these three topics in parallel:
1. Current state of Rust web frameworks
2. Best practices for GraphQL authentication
3. Performance comparison of PostgreSQL vs MySQLThe agent will spawn up to 3 subagents concurrently and combine the results.
Example
You: Debug why my tests are failing in the auth module. Look at all the test files and the implementation.
Agent: I'll delegate this to a subagent to analyze all the files without flooding our conversation...
[delegates task]
[receives summary]
The issue is in `auth.test.js` line 47 — the mock isn't being reset between tests...