Claude Code Field Guide
25 / 35

Sub Agents

Specialists that run in their own context window, do focused work, and report back a summary — keeping your main conversation clean.

Updated since the video
Currency check: Concept and rationale unchanged; the configuration system around subagents has become considerably richer.

A long session accumulates context, and a generalist with too much information in its window tends to underperform a focused specialist with a clean one. Sub agents solve this: your main session hands off a self-contained task to a subagent with its own context window, its own system prompt and tool access, and its own results (it still follows the shared CLAUDE.md); the subagent works independently and returns a summary rather than flooding your main conversation with its raw search results and intermediate steps.

Two reasons to reach for one: quality (a focused specialist beats a distracted generalist) and speed (multiple subagents can run in parallel on unrelated tasks). The rule of thumb from the video still holds — use a skill when you want Claude to be better at something in your current conversation; use a subagent when a task is fully self-contained and can run unsupervised. Claude Code will also spin up subagents on its own when it judges the task warrants it, without you asking.

What's grown since the video: subagents are now defined as markdown files with YAML frontmatter (name, description, allowed tools, model, permission mode, even their own persistent memory scope), there are built-in subagents (Explore, Plan, general-purpose) available out of the box, and a subagent can be run isolated in its own git worktree so its file edits can't collide with your main session's.

Researching a library without cluttering the main thread

Asked to evaluate three charting libraries, Claude Code delegates the exploration to a subagent that reads docs and example repos in its own context, returning a clean comparison summary — instead of the main conversation filling up with pages of documentation excerpts.

Parallel code review across concerns

A developer spins up separate subagents to review the same pull request for security issues, performance, and test coverage simultaneously, cutting total review time versus one agent working through all three sequentially.