2 min lesson
Sub-agents: parallel tools with isolated context
Walk through each part of "Sub-agents: parallel tools with isolated context", then explain what each one does.
Step 1 of 2
Sub-agents: parallel tools with isolated contexteach returns just its result
The other way an agent acts beyond text is by spawning sub-agents. A parent agent runs smaller agents simultaneously for parallelizable, independent subtasks - each with its own context window. The mechanic that makes this efficient: each sub-agentA child agent a main agent spawns to work in parallel with its own context window, handing results back so the parent's context stays clean. Press Enter for the full definition. takes a bucketed task and returns just its result to the parent, so the parent's window fills slowly instead of carrying every sub-agent's full working context. In one demo the parent used only a small fraction of its window to spin up two sub-agents and summarize. This also solves the old multi-tab collision problem, where two agents editing the same file would block each other.
- Explore
- Understand the codebase - the default research helper.
- Bash
- Run terminal commands in isolation.
- Browser
- Drive the built-in browser.
- Custom
- Create your own via a 'create sub agent' skill - e.g. a Devil's Advocate, or the internal 'Oracle' pinned to the most expensive thinking modelA reasoning model (shown with a brain icon in Cursor's picker) that spends extra compute before answering; reach for it on complex, nuanced work and a standard model for fast, simple tasks. Press Enter for the full definition.. Pick each sub-agentA child agent a main agent spawns to work in parallel with its own context window, handing results back so the parent's context stays clean. Press Enter for the full definition.'s model (inherit or override) and keep it specialized.
Each returns its result to the parent, which reads only what it needs.
The clean heuristic to teach: if task B is unrelated to task A, start a NEW chat (don't carry A's context into B). If B and C both depend on A's output but are unrelated to each other, use sub-agents - they parallelize, keep contexts isolated and hand back only results. MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. is the connective-tissue layer that keeps all of this inside one surface, and cloud agents inherit the MCP tools you connected client-side - but watch the anti-pattern: loading every tool of an MCP server can blow up the context window, so audit installed integrations if MCP is eating context.