Skip to content
Subscribe

The Delegation Decision Tree: When to Spawn Sub-Agents

The hardest skill in multi-agent orchestration isn’t building agents β€” it’s knowing when to use them. Delegate too much and you waste resources on overhead. Delegate too little and your CEO agent drowns in execution details.

This framework gives you a repeatable decision process.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ New Task Received β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
Is this < 30 seconds?
β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
YES NO
β”‚ β”‚
Do it yourself Is this > 5 min
β”‚ OR > 3 steps?
β”‚ β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
β”‚ YES NO
β”‚ β”‚ β”‚
β”‚ DELEGATE Could parts
β”‚ β”‚ run in parallel?
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
β”‚ β”‚ YES NO
β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ PARALLEL SINGLE
β”‚ β”‚ SPAWN DELEGATE
β”‚ β”‚ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
Select model & timeout

These tasks have more spawn overhead than execution cost:

  • Reading a config file
  • Checking git status
  • Looking up a value in memory
  • Simple math or date calculations
  • Answering from existing context

πŸ”€ Delegate to Specialist (> 5 min OR > 3 steps)

Section titled β€œπŸ”€ Delegate to Specialist (> 5 min OR > 3 steps)”

These justify the spawn overhead:

  • Building or modifying code
  • Running test suites
  • Web research with multiple queries
  • Content drafting (articles, emails)
  • Deployment pipelines
  • Data processing or transformation

When tasks don’t depend on each other’s output:

  • Research competitors AND build landing page
  • Write 3 articles simultaneously
  • Deploy frontend AND run backend tests
  • Scan email AND check calendar AND monitor Twitter

Match the model to the cognitive load (pricing as of April 2026 β€” verify at anthropic.com/pricing):

Task TypeModelCost/M tokensTimeoutRationale
Code generationHaiku$0.80 in / $4 out15 minFollows instructions, fast iteration
Code reviewSonnet$3 in / $15 out10 minNeeds to understand intent + quality
Web scrapingHaiku$0.80 in / $4 out5 minPattern matching, data extraction
Content writingSonnet$3 in / $15 out3 minVoice, nuance, creativity
Strategic analysisOpus$15 in / $75 out10 minComplex multi-factor reasoning
Data transformationHaiku$0.80 in / $4 out5 minMechanical, well-defined rules
Monitoring/alertsHaiku$0.80 in / $4 out2 minSimple checks, binary outcomes

Every spawn needs an explicit timeout. No exceptions.

Timeout = Expected duration Γ— 2

If a coding task should take 7 minutes, set a 15-minute timeout. This provides buffer for retries without allowing infinite loops.

  1. Kill the agent β€” don’t let it keep burning tokens
  2. Assess the situation β€” was it stuck, or was the task genuinely complex?
  3. Retry with adjustments:
    • Break the task into smaller pieces
    • Provide more specific instructions
    • Try a different model
    • Increase the timeout if the task was legitimately complex
CategoryDefaultMax
Coding15 min30 min
Research5 min10 min
Writing3 min5 min
Monitoring2 min3 min
Deployment10 min20 min

Give sub-agents the minimum context needed for their task:

  • βœ… Specific task description
  • βœ… Relevant file paths
  • βœ… Technical constraints
  • βœ… Expected output format
  • ❌ Full MEMORY.md (security + token waste)
  • ❌ Unrelated project context
  • ❌ Personal information unless needed
  • ❌ Full conversation history
# Good task prompt
"Build a React form component in src/components/ContactForm.tsx.
Fields: name (required), email (required, validated), message (textarea).
Use Tailwind for styling. Run tests after building."
# Bad task prompt
"Here's everything about my life, my projects, my memories...
oh and also build a form."

Running too many agents simultaneously causes:

  • API rate limiting
  • Resource contention
  • Difficult result synthesis
  • Token budget blowouts

Recommended limits:

TierMax ConcurrentUse Case
Conservative2Learning, budget-constrained
Standard5Normal operations
Aggressive10Time-critical, budget available
1. Task arrives
2. Classify (< 30s? > 5 min? Parallel?)
3. Select model + timeout
4. Prepare minimal context
5. Spawn agent(s)
6. Wait for completion
7. VERIFY results (run tests, check output)
8. If broken β†’ iterate (same agent, refined instructions)
9. If passing β†’ deliver to user

The verification step is non-negotiable. Read the orchestration guide for why skipping verification is the #1 orchestration failure mode.


About the author: JD Davenport builds AI agent systems at OpenClaw. Follow on LinkedIn for updates on building AI agents for business.