Create custom subagents changedsub-agents
Nearest release: v2.1.330, published 5 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 21 Nov 2026 00:17 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 21 Nov 2026 00:37 UTC.
Upstream edited
Recorded here
Lines+3added
Lines−3removed
From line
169
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits112to this page, all time
The whole hunk
from line 169, old and new numbered
/
from line 169
169169
170170Claude Code scans `.claude/agents/` and `~/.claude/agents/` recursively, so you can organize definitions into subfolders such as `agents/review/` or `agents/research/`. The subdirectory path doesn't affect how a subagent is identified or invoked, because identity comes only from the `name` frontmatter field.
171171
172Keep `name` values unique across the whole tree: if two files under the same `.claude/agents/` directory, including its subfolders, declare the same name, Claude Code loads only one of them, chosen by filesystem read order rather than a documented precedence. Across nested project directories, the definition closest to the working directory wins, as described above. The [`/doctor`](https://code.claude.com/docs/en/commands#all-commands) setup checkup reports files in the same directory that share a name and proposes renaming or removing all but one.
172> [!NOTE]
173>
174> Keep `name` values unique across subfolders. If two files under the same `.claude/agents/` directory declare the same name, Claude Code loads only one of them. The [`/doctor`](https://code.claude.com/docs/en/commands#all-commands) setup checkup reports files in the same directory that share a name and proposes renaming or removing all but one.
173175
174176Plugin `agents/` directories are also scanned recursively. Unlike project and user scopes, a subfolder inside a plugin's `agents/` directory becomes part of the [scoped identifier](#invoke-subagents-explicitly): a file at `agents/review/security.md` in plugin `my-plugin` registers as `my-plugin:review:security`.
175177
from line 369
367369* A subagent with `model: inherit` or no `model` field
368370* The built-in Explore, Plan, and general-purpose subagents
369371* A [fork](#fork-the-current-conversation)
370
371In plan mode, these subagents run on Opus if you set your session's model to [`opusplan`](https://code.claude.com/docs/en/model-config#opusplan-model-setting), or on Sonnet if you set it to `haiku`.
372372
373373#### Check a subagent's model
374374
No line in this hunk matches that.