When should Claude Code use a subagent?
A subagent is a helper Claude Code sends off to do one focused job and report back. When that saves you a cluttered session, and when it only burns more of your allowance.
By Nick
On this page
Before you start
Learn
What is an AI agent?
A subagent is like sending a colleague to the archive. You give them one clear question, they go off, read whatever they need, and come back with a one-page answer. You never see the pile of files they went through. That is the whole point.
In Claude Code, a subagent is a separate helper with its own working memory (its own context window). The main session hands it a task, it works alone, and only its summary comes back.
Why that matters
Every file Claude Code reads fills up the conversation. Fill it with a hundred search results and the session gets slower, forgets earlier instructions and needs compacting or a restart sooner. A subagent keeps the mess in its own space. Your main conversation gets the answer and stays clean.
When it helps
- Looking something up across a big project. “Find every place we send an email, and list the files.” Lots of reading, short answer.
- A second opinion on a small area. “Review this one file for obvious problems, change nothing.”
- Two independent questions at once. Research one thing while it works on another.
The pattern: a lot of reading, a small answer, and no need to know what you discussed earlier.
When it does not
- Tiny jobs. Fixing a typo through a subagent just adds a step.
- Work that needs the whole conversation. A subagent starts fresh. It does not know the decision you made ten minutes ago unless you tell it.
- Lots of them at once. Each one is more work you have to check, and more of your allowance.
What it costs
Anthropic’s own wording is plain: “The subagent’s own requests still draw on your usage.” It is
not free work on the side. It can be cheaper overall when it keeps a long search out of your
main conversation, and you can ask for a smaller, cheaper model for simple jobs. There is no
published rule of thumb for how much more it uses, so watch /usage the first few times.
How to ask for one well
Claude Code often decides on its own; it has built-in helpers for exploring and planning. When you want to steer it, say so and give the helper a proper brief:
Use a subagent for this. Its job: find every place this project sends an email. It should
only read files, not change anything. Bring back a list of file names and one line on what
each one sends. I will check the list before we change anything.
Scope, limits, what to bring back. The same things you would tell a person.
What working looks like. You get a short list back, your conversation did not fill with search results, and when you open two or three of the files it named, they say what it said they do. Check them. A subagent can be confidently wrong, just like the main session.
If you find yourself writing the same brief every week, save it as a custom subagent with
/agents, and limit it to reading tools only. For the step-by-step procedure itself, a
skill is usually the simpler fit.