Claude Code can spawn isolated subagents for parts of a task. The trick is knowing when delegation actually helps — and when it just doubles your context bill.
10 min · Reviewed 2026
What subagents are
A subagent is a fresh Claude session spawned by the main agent for a scoped task. It gets its own context window, its own tool calls, and returns a summary back to the parent. The parent does not see the subagent's full transcript — it sees the result.
When subagents help
Searching a large codebase: subagent reads many files, returns a focused summary
Parallel exploration: spawn 3 subagents to investigate 3 hypotheses in parallel
Wide refactors where each module is independent and self-contained
Repeated, scoped work (apply the same change in 12 places, each in its own subagent)
When the parent's context is too valuable to spend on a sub-task
When subagents don't help
Tightly coupled work where the parent needs to see the actual code
Tasks that are short enough to do inline (under 5-10k tokens of effort)
Work where the subagent's context is the same as the parent's anyway
Anything the parent can do faster than spinning up a new agent
Quality-sensitive work where you want to read the full reasoning trace
The delegation prompt
Bad spawn prompt
Good spawn prompt
'Look at the auth code'
'Read every file under src/auth/. Identify any place we trust user-supplied input. Return a list with file:line and the exact line.'
'Refactor this'
'Apply the renamed-field migration in src/server/users.ts only. Update tests. Return the diff.'
'Investigate why tests fail'
'Run pnpm test. Read the failure output. Return the failing test names with one-line root-cause guesses.'
Apply: delegate one task today
Pick a wide read task in a codebase you're learning
Write a precise spawn prompt with a defined return shape
Run it as a subagent
Compare what came back to what you'd have done yourself
Refine the prompt for next time
The big idea: subagents are great when a task can be cleanly scoped and the return value can be summarized. Otherwise they're just expensive parallelism.
End-of-lesson check
8 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-claude-code-subagents-creators
What is the main idea of "Subagents: When To Delegate vs Do It Yourself"?
Claude Code can spawn isolated subagents for parts of a task.
Use AI as the final authority for the whole decision
Avoid checking the answer once it sounds polished
Focus only on speed instead of judgment
Which concept is most central to "Subagents: When To Delegate vs Do It Yourself"?
context isolation
subagent
parallelism
delegation cost
Which use of AI fits this topic best?
Let the AI decide what matters without your review
Use the answer before checking whether it fits the situation
Searching a large codebase: subagent reads many files, returns a focused summary
Treat the AI output as automatically correct
What should a careful learner remember about "The summary is the whole product"?
Use AI to draft or organize ideas about subagent, then verify before acting.
Skip the context so the tool can guess faster
Treat the output as private even after sharing it online
Use the answer without checking the source
You want to use AI after this lesson. What is the safest next step?
Act immediately because the AI answer is written clearly
Use AI for drafting and comparison, but verify before publishing or relying on it.
Hide uncertainty so the final answer looks cleaner
Use private or sensitive details before checking permission
How should AI output about subagent be treated?
As proof that no other source is needed
As a replacement for context, consent, or expert review
As a draft or helper output that still needs human judgment and verification
As something that becomes correct when it sounds confident
Name one way to verify an AI answer about subagent.
Which action would help you apply "Subagents: When To Delegate vs Do It Yourself" responsibly?
Use the tool to avoid thinking through the tradeoff
Keep going even if the output conflicts with a trusted source
Treat the AI output as automatically correct
Parallel exploration: spawn 3 subagents to investigate 3 hypotheses in parallel