Anthropic's Sub-Agent Isolation Pattern for Deep Research
TRIGGER
Complex research and analysis tasks required deep exploration that consumed tens of thousands of tokens, but the orchestrating agent needed to synthesize results across multiple exploration paths without its context being polluted by raw exploration data.
APPROACH
Anthropic's multi-agent research system uses specialized sub-agents for focused tasks with clean context windows. The main agent coordinates with a high-level plan while sub-agents perform deep technical work or use tools to find relevant information. Each sub-agent might explore extensively using tens of thousands of tokens or more, but returns only a condensed summary of 1,000-2,000 tokens to the lead agent. The detailed search context remains isolated within sub-agents while the lead agent focuses on synthesis and analysis.
PATTERN
“Exploration tokens in the lead agent's context kill synthesis quality. Spawn sub-agents for each research path; they return condensed summaries. Exploration tokens die with the sub-agent while insights survive.”
✓ WORKS WHEN
- Task requires exploring multiple paths where each path could consume 10,000+ tokens
- Parallel exploration provides value (research, search, analysis with multiple hypotheses)
- Sub-agent outputs can be meaningfully condensed to 1,000-2,000 tokens without critical loss
- Lead agent's task is synthesis/coordination rather than detailed technical execution
- Exploration paths are independent enough to parallelize
✗ FAILS WHEN
- Task is inherently sequential where each step depends on detailed results from the previous
- Sub-agent results cannot be condensed without losing critical nuance for the lead agent's decisions
- Overhead of spawning and coordinating sub-agents exceeds context savings
- Task requires the lead agent to see raw data for verification or detailed reasoning
- Single agent with compaction would achieve similar results with less coordination complexity