One change
Create custom subagents
sub-agents
Nearest release: v2.1.237, published an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
sub-agents Changed · +13 / -0 lines
#### Subagent files Claude Code skips
from line 298
| `color` | No | Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` | | `initialPrompt` | No | Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](/docs/en/commands) and [skills](/docs/en/skills) are processed. Prepended to any user-provided prompt | +#### Subagent files Claude Code skips + +Claude Code skips a file in a project, user, or managed `agents` directory, or in one under a directory you add with `--add-dir`, without reporting it in the session, when the frontmatter has any of these problems: + +* **No `name`**: Claude Code treats the file as documentation kept beside your agents. +* **A `name` that starts with `-` or contains `:`**: Claude Code skips the file and writes an error to the debug log. See the `name` row in the table above. +* **A `name` but no `description`**: Claude Code skips the file and writes the reason to the debug log. +* **YAML that doesn't parse**: Claude Code reads no fields from the file, skips it, and writes the parse error to the debug log. + +To see the debug log, run Claude Code with `--debug`. A [plugin subagent](/docs/en/plugins-reference#agents) whose frontmatter has no `name` or doesn't parse still loads, under its filename. + +To find files in an `agents` directory whose frontmatter doesn't parse, run `claude plugin validate` against the directory, for example `.claude/agents` or `~/.claude/agents`. Claude Code checks only [the directory you name](/docs/en/plugin-marketplaces#validate-a-plugin-or-a-directory-without-a-manifest), and doesn't flag a file whose frontmatter parses but has no `name`. Requires Claude Code v2.1.233 or later. + ### Choose a model The `model` field controls which [AI model](/docs/en/model-config) the subagent uses: