What Are Subagents.mp4

What Are Subagents

Subagents are one of the main ways Claude Code keeps the main conversation useful. They let the orchestrator agent hand off focused work to a separate context window, then bring back a summary instead of filling the parent context with every detail.

Why subagents matter

Claude Code has a limited context window. Some of that window is always taken up by the system prompt, tools, and other instructions Claude Code needs in order to behave like an agent.

After that, the session still needs room for real work:

The more tokens Claude Code spends on exploration, the fewer tokens remain for implementation. But if it explores too little, the implementation gets worse because the model has less context about the repo.

Subagents help with this tradeoff.

The orchestrator and the subagent

The agent you talk to directly is the orchestrator agent. When it needs help with a focused task, it can spawn a subagent with a fresh context window.

That subagent can spend its own tokens doing the task, such as exploring a repo or gathering information, without polluting the parent conversation. When it finishes, it reports a summary back to the orchestrator.

A useful way to think about it: