D5 · Context-isolation subagent
Family: Context and memory
An exploration is handed to a subagent with a clean context, which returns only a condensed summary.
Principle
Instead of reading dozens of files or pages in its own context, the main agent hands the exploration to a subagent. The subagent works in a clean window and sends back only a summary, of 1,000 to 2,000 tokens. It reads and summarises; the main agent decides and writes.
The problem it solves
Exploring fills the main agent’s context with details it no longer needs once the answer is found.
When to use it
- The job is to answer a well-defined question that takes a lot of reading: searching a codebase, looking up an order history.
- You want to protect the main context from pollution by intermediate results.
When to avoid it
- The subagent would need the main agent’s full context to do anything beyond answering a question: every handoff loses information.
- Several subagents would write in parallel: their implicit decisions conflict. Keep a single thread of writes.
Common pitfalls
The anti-patterns that misuse this pattern, best established first. Each sheet describes the symptoms, the public incidents and the remedies.
Framing and choice of level
- AP04 · No effort scaling — A simple factual question gets the same machinery as an in-depth investigation.
Oversight, operations and governance
- AP80 · Cost blind spots — Spend is tracked per call or per main agent; sub-agents, retries and failures slip under the radar.
Synonyms by vendor
- Sub-agent architectures (Anthropic (context engineering))
- Subagents (LangChain v1, Claude Agent SDK)
Neighbouring patterns
Sources
- Effective context engineering for AI agents — Anthropic, 2025-09-29
- Building multi-agent systems: when and how to use them — Anthropic (C. Phillips), 2026-01-23
- Don’t Build Multi-Agents — Cognition (W. Yan), 2025-06-12
Content reviewed on 2026-10-02