Hands-OnAI
← All guides
ProductivityNew11 min read

Claude Code Subagents Explained: What They Are and How to Use Them (2026)

A Claude Code subagent is a separate helper AI that handles one task in its own workspace and hands back just the result — keeping your main chat clean, focused, and cheaper to run. Here's what subagents are, when they help, and how to make your own without writing code.

A Claude Code subagent is a separate helper AI that Claude Code hands a single job to. It works in its own private workspace — its own memory, its own tools, its own permissions — finishes the task, and hands back only the answer. Think of your main Claude Code chat as the manager and subagents as specialists it calls in: one to search your files, one to review code, one to run tests. The messy work happens off to the side, so your main conversation stays clean, fast, and focused.

You do not need to be a developer to understand this. Subagents are just a way to keep Claude organized when a job has a lot of moving parts. And the easiest way to make one is to simply ask Claude to make it for you — in plain English.

What is a subagent in Claude Code?

A subagent is a second copy of Claude that your main Claude Code session spins up to handle one specific task. It runs in its own context window — its own short-term memory — with a system prompt that tells it exactly what its job is, a limited set of tools it's allowed to use, and its own permissions. When it's done, it returns a short summary to the main chat instead of dumping everything it read or did along the way.

That last part is the whole point. When Claude reads twenty files to answer one question, all twenty files normally pile up in your main conversation's memory. A subagent reads those twenty files in its own memory and reports back with a two-sentence answer. Your main chat never has to carry the clutter.

New to Claude Code? Start with the What Is Claude Code guide first, then come back here. Subagents make the most sense once you've watched Claude read and edit real files once or twice.

Why would you use a subagent?

Long Claude Code sessions get heavy. Every file it reads, every command it runs, and every side-quest it explores stays in memory — which slows Claude down and quietly runs up the cost. Subagents fix that by moving the heavy, noisy work somewhere else. According to Anthropic's own documentation, subagents help you in five clear ways:

  • Keep your main chat clean — exploration and research happen in the subagent's memory, not yours, so the conversation stays focused on what matters.
  • Stay in control — you decide which tools a subagent can touch, so a read-only research agent can't accidentally change your files.
  • Reuse the same helper everywhere — save a subagent once and it's available in every project on your computer.
  • Get more focused answers — a subagent with one clear job and a tailored instruction sheet does that job better than a general-purpose chat juggling ten things.
  • Spend less — you can point simple subagents at a faster, cheaper model (like Claude Haiku) so routine work doesn't cost premium-model prices.

What is a real-world example?

Say you ask Claude to fix a bug in your website. Without subagents, Claude reads dozens of files looking for the cause, and all that text clogs the chat. With subagents, Claude sends an Explore subagent to hunt through the files quietly. The Explore agent reads everything, then reports back: "The problem is in the login file, on line 42." Now your main Claude — with a clean, uncluttered memory — makes the actual fix. The searching and the fixing are split into two workspaces, and only the useful part comes back.

The simple mental model: the main chat is the general contractor. Subagents are the subcontractors it calls in for a specific job. Each one shows up, does its part, and leaves — the contractor doesn't have to watch every hammer swing.

What subagents come built in?

You don't have to build anything to start benefiting from subagents. Claude Code ships with several ready-made ones and uses them automatically when they fit. The three you'll notice most:

  • Explore — a fast, read-only searcher. It can look through your files but cannot change them (Write and Edit are switched off). Claude sends it out whenever it needs to understand your project without touching anything.
  • Plan — a read-only researcher used in planning mode. When you ask Claude to plan before it acts, Plan gathers the background quietly so the main chat can stay hands-off until you approve.
  • General-purpose — the all-rounder. It can both explore and make changes, so Claude uses it for bigger, multi-step jobs that need real work done, not just a look-around.

There are a couple of quiet helpers too — like the one that answers your questions about Claude Code itself. You'll rarely call these by hand; Claude reaches for them on its own when the moment fits.

How do you create your own subagent?

The easiest way, by far, is to just ask Claude to make one for you. You describe the helper you want in plain language, say where to save it, and Claude writes the whole thing. No code required. For example, you could type:

You

Create a personal "proofreader" subagent in ~/.claude/agents/ that reads my writing and suggests clearer, tighter versions. Make it read-only and have it use a cheaper, faster model.

Behind the scenes, a subagent is just a small text file with a few settings at the top — its name, a description of when to use it, which tools it's allowed, which model it runs on — followed by its instructions. You don't have to memorize any of that, because Claude fills it in for you. But it's useful to see what one looks like so it feels less like magic:

---
name: proofreader
description: Reviews writing and suggests clearer, tighter versions.
tools: Read
model: haiku
---
You are a careful proofreader. For each change you suggest,
show the original line and a cleaner version, and explain why.

Where you save the file decides who can use it. Put it in your personal ~/.claude/agents/ folder and the subagent works in every project on your computer. Put it in a single project's .claude/agents/ folder and it only shows up there. If you're not sure, personal is the friendly default — and, again, Claude handles the saving for you when you ask.

Heads up: if you create a subagent and Claude can't find it right away, restart Claude Code and try again. A session that was already open before the folder existed won't notice the new file until it starts fresh.

How do you actually use one?

Two ways, and you'll use both without thinking about it:

  • Let Claude decide. Claude reads each subagent's description and calls the right one automatically when a task matches. This is why a clear, honest description matters — it's how Claude knows when to reach for that helper.
  • Ask for it by name. If you want a specific one, just say so: "Use the proofreader agent to check this paragraph." Claude hands the job straight to it.

You can even have Claude run several subagents at once when the tasks don't depend on each other — for example, checking three separate files in parallel. That can finish a batch of work noticeably faster than doing it one piece at a time.

When should you NOT use a subagent?

Subagents are powerful, but they're not free and they're not always the right call. Every subagent has a small startup cost — Claude has to brief it and hand over the tools — so for tiny jobs that overhead isn't worth it. A few honest limits worth knowing:

  • Skip them for quick, simple tasks. For a one-line change or a fast lookup, the setup overhead can cost more than it saves. Just let the main chat do it.
  • Don't split work that has to share notes. Subagents can't see each other's memory. If two steps depend on the same running context, keep them together in the main conversation.
  • Be careful with tricky judgment calls. For work that needs deep, connected reasoning, a hand-off to a separate helper can lose the thread. Big, nuanced thinking often belongs in one place.
  • They aren't automatically cheaper. Subagents save money mainly by keeping your main chat lean and by running simple work on cheaper models — not by existing. Use them when the saved clutter is worth the overhead.
Rule of thumb: reach for a subagent when a side task would flood your main chat with stuff you'll never look at again — long searches, big test outputs, piles of logs. That's exactly the mess subagents are built to keep out of your way.

Where should a beginner start?

You already are. The built-in Explore, Plan, and General-purpose subagents do their thing automatically — so the moment you use Claude Code on a real project, you're getting the benefit without lifting a finger. When you notice yourself asking Claude to do the same specialized job over and over, that's your cue to make a custom one. Describe it, let Claude write it, and you've got a reusable helper for life.

Want to learn Claude Code the hands-on way?

Inside the club there's a full Claude Code course — step-by-step video lessons with me, plus a support group so you're never stuck. We start from the basics and build up to subagents, automations, and full workflows.

Frequently asked questions

What is a subagent in Claude Code?

A subagent is a separate helper AI that Claude Code spins up to handle one specific task. It runs in its own memory with its own tools and permissions, does the work, and returns only a short summary to your main chat. This keeps the main conversation clean, fast, and cheaper to run.

Do I need to know how to code to use subagents?

No. The built-in subagents (Explore, Plan, and General-purpose) work automatically whenever they fit, so you get the benefit without doing anything. And to make your own, you just describe the helper you want in plain English and ask Claude to write the file for you.

How do I create a custom subagent?

The easiest way is to ask Claude to make one: describe the helper you want, say where to save it, and Claude writes it for you. Technically it's a small text file with a name, a description, allowed tools, and a model, saved in your ~/.claude/agents/ folder (for every project) or a project's .claude/agents/ folder (for just that one).

How does Claude decide which subagent to use?

Claude reads each subagent's description and delegates automatically when a task matches. You can also call one by name — for example, 'Use the code-reviewer agent to check this file' — and Claude hands the job straight to it. Clear descriptions are what let Claude pick the right helper on its own.

Do subagents save money?

Sometimes, but not automatically. Subagents save mainly by keeping your main chat lean — heavy searches and logs stay in the subagent's memory — and by letting you run simple tasks on cheaper, faster models like Claude Haiku. For tiny one-line jobs, the setup overhead can outweigh the savings, so it's best to skip them there.

When should I not use a subagent?

Skip subagents for quick, simple tasks where the setup overhead isn't worth it, and for steps that need to share the same running context — subagents can't see each other's memory, so tightly connected work belongs in the main chat. Use them when a side task would otherwise flood your conversation with clutter you'll never reference again.

Still have questions?

Stuck on a step, or want to send a screenshot and have someone take a look? That's exactly what the community is for — real people, quick answers, and no question too basic.

Try your first two weeks for $1

No commitment · cancel anytime