CHAPTER 11 · Subagents and Multi-Agent Orchestration
Subagents and Multi-Agent Orchestration
By now you have a single agent that loops, builds prompts, manages context, runs tools safely, and remembers things. The next leap is to let it spawn other agents. A subagent is a fresh agent instance with its own context window that the parent hands a task; it works autonomously and returns a result. This is the "multi-agent" layer (layer 5) and "agent contracts and orchestration" (pillar 4).
The single most important reason subagents exist is context isolation, and it follows directly from Chapter 4. A research or exploration task generates a huge amount of noisy intermediate output (file dumps, search results, DOM snapshots). If that all lands in your main conversation, it eats your context window and your budget. A subagent does that messy work in its own window and returns only a tidy summary. Cursor's docs say it plainly: "Long research or exploration tasks don't consume space in your main conversation." The parent stays focused on decisions; the subagent absorbs the mess.
A real-life analogy: you are leading a project and need a competitor analysis. You do not read fifty articles yourself and clutter your desk; you ask a researcher to do it and bring back a two-page brief. You get the conclusion without the fifty tabs. The subagent is that researcher, and its fresh context window is the separate desk.