Canonical docs. This page is a short map for our students. Full detail, updates, and CLI flags live in Anthropic’s documentation: code.claude.com/docs/en/sub-agents
Claude Code
Specialized assistants that run in their own context so heavy search, logs, or file dumps don’t flood your main thread — they return a summary. Use them when the same kind of task repeats; define a custom subagent with a clear description so Claude knows when to delegate.
Subagents work inside one session. For multiple agents in parallel across separate sessions talking to each other, see agent teams in the official docs — different mechanism.
Claude can delegate automatically. Built-ins include (names and behavior may evolve — check docs):
| Name | Role (short) |
|---|---|
| Explore | Fast, read-only codebase search (often Haiku); keeps exploration out of main context. |
| Plan | Research for plan mode — read-only, supports planning without nesting subagents inside subagents. |
| general-purpose | Broader tasks that need both exploration and edits; inherits tools unless restricted. |
Exact tool lists, models, and extra helpers (e.g. status line, in-product guide) are maintained upstream.
/agents in Claude Code — Library tab, create user or project agents, pick tools and model.~/.claude/agents/ (all projects). Project: .claude/agents/ (check into git for the team).claude agents lists agents; --agents '{...}' can pass JSON for a session (see docs).Minimum frontmatter usually includes name, description (when to delegate), optional tools, model, memory, hooks, etc.
--- name: code-reviewer description: Reviews code for quality and security; use after edits. tools: Read, Glob, Grep model: sonnet --- You are a code reviewer. Give actionable feedback...
Agent Pattern School assumes a file-backed agent with memory and skills. In Claude Code, subagents are one way to isolate work and enforce tool boundaries — aligned with the same ideas as MEMORY.md, SECURITY.md, and delegation patterns, even though the implementation is editor-native rather than OpenClaw-style channels.