Claude Code Subagents: Your AI Team, Explained Simply

Claude Code subagents explained for non-programmers: a team of AI helpers, each with its own memory. Create your first one in 5 minutes just by asking Claude.

claude-codesubagentsai-agentsautomation
Updated 2026-08-26EAEvgenii ArsentevEvgenii Arsentev · MD, PhD

Reviewed for accuracy by Evgenii Arsentev, MD, PhD · 2026-08-26

Claude Code subagents are specialized AI assistants that your main Claude spawns to handle side tasks — each one works in its own separate context window and brings back only the summary. You create one in five minutes just by asking Claude, no code required. I'm Evgeny, and this is the feature that turned my single AI assistant into a small department.

What are subagents in Claude Code?

An agent is simply Claude with a job description. Your main conversation is the boss; a subagent is an employee the boss hires for one task: 'go research this', 'go review that code'. The employee gets its own instructions (called a system prompt), its own set of allowed tools, and — this is the magic — its own working memory. It does the messy digging in its own room and returns with a one-page report instead of dumping three hundred files on the boss's desk.

What are subagents in AI, in plain words?

The 'sub' just means subordinate: an agent spawned by another agent. Here's why it matters even if you never write code. Claude's working memory — the context window — is like a desk. Every file it reads piles onto the desk, and a cluttered desk makes a sloppy worker. A subagent rents a second desk: all the search results, logs, and dead ends pile up there, and only the conclusion comes back to yours. One detail from the docs worth knowing: a subagent can now hire its own subagents — a reviewer can dispatch a checker for every finding, and only the top employee's one-page report ever reaches your desk. Chains are capped at three layers below your main session by default — the office never spirals into infinite bureaucracy. And since v2.1.232, background tasks Claude spawns in interactive sessions run as forks by default: they inherit the full conversation context instead of starting cold, so Claude doesn't need to re-explain the situation.

Why is everyone so obsessed with this?

Because delegation is built in, not bolted on. Claude Code ships with built-in subagents it uses automatically: Explore (a read-only researcher that searches your project without changing anything), Plan (gathers context when you're in plan mode), and general-purpose (for tasks that mix exploration with changes). You've probably benefited from them without noticing. The obsession kicks in when people discover the next level: custom subagents — your own specialists with your own rules, reusable across every project. That's also why 'Claude Code orchestration' became such a buzzword: one boss, many workers, your instructions.

How to create subagents in Claude Code

A read-only reviewer, created by asking Claude

  1. 1Inside a Claude Code session, tell Claude what you need: 'Create a personal code-reviewer subagent that reviews code for quality and best practices. Give it only read-only tools (Read, Glob, Grep), saved to ~/.claude/agents/'.
  2. 2Claude writes the Markdown file to ~/.claude/agents/ for you — that makes it personal, available across all your projects.
  3. 3The agent is ready in the same session. Test it right away: 'use the code-reviewer subagent to check my project'.
  4. 4To see all your agents, run /agents — it prints the path to your agents folder and a reminder of the file format.

Under the hood, a subagent is just a Markdown file with a small header — honestly the least scary 'configuration' in the business. Project-specific ones live in .claude/agents/, personal ones in ~/.claude/agents/. One caveat from the docs: if you edit an agent file directly on disk, restart the session to pick up the change. Agents Claude creates for you in the current session work immediately.

What a subagent file looks like inside
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---

You are a friendly reviewer. Check clarity, naming,
and bugs. Return a short prioritized list.

Only 'name' and 'description' are required. 'tools' is the allowlist (skip it and the agent inherits everything), 'model' picks the brain — and the text below the header is the job description.

How to use subagents in Claude Code

The 'description' field is the whole hiring policy: Claude reads it to decide when to hand a task over. Write it like a when-to-call-me note — 'Use proactively after code changes' works better than 'a code reviewer'. You can always force the issue by naming the agent in your request: say to Claude, 'use the code-reviewer subagent on yesterday's changes'.

The budget trick

The 'model' field accepts sonnet, opus, haiku, or 'inherit'. Route routine chores — summarizing, searching, checking — to the faster, cheaper Haiku, and save the heavyweight model for thinking. Same team, smaller payroll.

Lab: hire your first employee

0/4

Start with one employee, not ten. A single read-only reviewer or explainer that you actually use beats a GitHub list of 'awesome subagents' you never touch. When you catch yourself giving the same instructions for the third time — that's not a prompt anymore, that's a job opening.

Free course

Stop reading about AI — start building with it

The free Claude Code course: your first site, tool or game — no coding. No upsells, no cross-sells — nothing to buy here.

Start free →

References

Selected peer-reviewed papers and preprints on the AI research behind this topic.

  1. [1]Zhu et al. (2022). A Survey of Multi-Agent Deep Reinforcement Learning with Communication. arXiv:2203.08975
  2. [2]Soyez et al. (2013). A Methodology to Engineer and Validate Dynamic Multi-level Multi-agent Based Simulations. arXiv:1311.5108
  3. [3]Jing et al. (2020). Model-Free Optimal Control of Linear Multi-Agent Systems via Decomposition and Hierarchical Approximation. arXiv:2008.06604
  4. [4]Peters et al. (2024). Emergent Language: A Survey and Taxonomy. arXiv:2409.02645
  5. [5]Rothfarb et al. (2025). Hierarchical Multi-agent Large Language Model Reasoning for Autonomous Functional Materials Discovery. arXiv:2512.13930
  6. [6]Takayama et al. (2025). AOAD-MAT: Transformer-based multi-agent deep reinforcement learning model considering agents' order of action decisions. arXiv:2510.13343
  7. [7]Bredell et al. (2024). Augmenting the action space with conventions to improve multi-agent cooperation in Hanabi. arXiv:2412.06333
EAEvgenii Arsentev

Author

Evgenii Arsentev

MD, PhD · AI transformation executive

Reading is the blue pill

Want to actually build this?

Guides explain. The free course transforms — personalized, gamified, and built to get you shipping fast.

Start the free course →