Subagent
A subagent is an AI agent started by another agent to handle one piece of a larger task in its own separate context, returning only its result to the agent that called it.
A subagent is a helper. The main agent writes a brief for one piece of work, such as finding every file that handles payments. The subagent starts fresh, with its own instructions and its own set of tools, works through the job, perhaps reading dozens of files or running many searches, and sends back a short summary. The main agent never sees the clutter, only the answer.
The main reason is the context window. Every file an agent reads and every search result it gets takes up space, and a crowded context makes the model slower, more expensive and more likely to lose track. Anthropic's Claude Code documentation describes subagents that each run in their own context window with a custom system prompt and their own tool permissions. They can be limited to read-only tools, and routine work can be sent to faster, cheaper models such as Haiku. A subagent is defined in a Markdown file with a short settings block at the top.
Claude Code ships with built-in subagents: Explore, a fast agent for searching code that cannot edit files; Plan, which gathers context in plan mode before a plan is proposed; and a general-purpose agent for multi-step work. As of December 2026 its documentation says a subagent can start its own subagents up to three layers below the main conversation by default. Anthropic's research feature, described in June 2025, uses the same idea at larger scale: a lead agent starts several subagents that search in parallel and report back.
The limits follow from the design. A subagent usually does not see the conversation that led to its brief, so it knows only what it is told. Anthropic found that vague briefs led subagents to duplicate each other's work, and its multi-agent research system used about 15 times as many tokens as an ordinary chat. The Claude Code documentation advises keeping work in the main conversation when it involves a lot of back-and-forth or shared context.
In practice a subagent is a role, not a different kind of model. The same model can act as the main agent in one moment and as a subagent in the next. When a product says it uses subagents, it means it is splitting work into separate, self-contained jobs, which helps most on large searches and tasks that produce a lot of output.
A subagent is an agent that another agent starts to do one part of a task. It works in its own separate context with its own instructions and tools, then returns a result. This keeps the main agent's context clear and lets parts of the work run in parallel. A multi-agent system is the whole arrangement of agents working together. A subagent is one role within it: a worker started by a coordinating agent for a specific job. A system with an orchestrator and several subagents is one common kind of multi-agent system. Usually not. A subagent starts with a fresh context and sees only the brief it is given, not the main conversation. It returns its result, and only that result enters the main agent's context. It depends on the system. In Claude Code, as of December 2026, the documentation says subagents can start their own subagents up to three layers below the main conversation by default, and this can be changed or switched off. Other products may not allow nesting at all.Common questions
What is a subagent in AI?
What is the difference between a subagent and a multi-agent system?
Do subagents share memory with the main agent?
Can a subagent start its own subagents?
Search for "Claude Code subagents", "subagent context window" or "orchestrator subagent pattern" to see how subagents are set up and used. Official documentation from the companies that build agent tools is the best source for exact behaviour, which changes between versions; engineering write-ups that report costs and failures are the best source for when subagents help. Check the date on any description of limits such as nesting depth.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.