Subagent with its own context window
Send a side task to a subagent with a fresh context window; only its short summary comes back.
Also called Context isolation, Context quarantine, Sub-agent architectures
Anthropic, LangChain, Cognition, Cursor
The problem
A side task such as a search or a test run would fill the main context with output used once.
Running tests, fetching documentation, or processing log files can consume significant context.
Codebase exploration generates large intermediate output that would bloat the main context.
Therefore
Each subagent might explore extensively, using tens of thousands of tokens or more, but returns only a condensed, distilled summary of its work (often 1,000-2,000 tokens).
Subagents are specialized AI assistants that Cursor's agent can delegate tasks to. Each subagent operates in its own context window, handles specific types of work, and returns its result to the parent agent.
Delegating tasks to subagents is one effective way that an agent can manage its own context. Subagents provide context isolation, so that the details of individual tasks can be withheld from a supervisor agent’s context window.
In use
Claude Code
Claude delegates to Explore when it needs to search or understand a codebase without making changes. This keeps exploration results out of your main conversation context.
Cursor
Cursor includes two built-in subagents that handle context-heavy operations automatically. These subagents were designed based on analysis of agent conversations where context window limits were hit.
Claude Research
Subagents facilitate compression by operating in parallel with their own context windows, exploring different aspects of the question simultaneously before condensing the most important tokens for the lead research agent.
Where it breaks
The subagent starts without the main agent’s context, so it can redo work or miss what matters.
The subtask agent lacks context from the main agent that would otherwise be needed to do anything beyond answering a well-defined question.
A subagent doing a simple task may be slower than the main agent because it starts fresh.
subagents may redo context-gathering operations, like file reads, already done by the supervisor.
Sources
- Effective context engineering for AI agentsPrithvi Rajasekaran, Ethan Dixon, Carly Ryan, and Jeremy Hadfield, Anthropic, Sep 29, 2025
Sub-agent architectures provide another way around context limitations.
- Organizing Context in a Multi-Agent HarnessThushanth Bengre, Chester Curme, LangChain, Sep 8, 2026
Subagents provide context isolation, so that the details of individual tasks can be withheld from a supervisor agent’s context window.
- Don’t Build Multi-AgentsWalden Yan, Cognition, Jun 12, 2025
- How we built our multi-agent research systemJeremy Hadfield, Barry Zhang, Kenneth Lien, Florian Scholz, Jeremy Fox, and Daniel Ford, Anthropic, Jun 13, 2025
- SubagentsCursor
- Create custom subagentsAnthropic
- Subagents (Deep Agents)LangChain
Subagents are useful for context quarantine (keeping the main agent’s context clean) and for providing specialized instructions.
Added Nov 14, 2026
