with one click
claude-code-subagents
Use when you have research, exploration, a large review, or 2+ independent tasks to run โ spawn subagents (the Agent/Task tool), in parallel when possible, to do focused work and keep the main context clean.
Menu
Use when you have research, exploration, a large review, or 2+ independent tasks to run โ spawn subagents (the Agent/Task tool), in parallel when possible, to do focused work and keep the main context clean.
Based on SOC occupation classification
Use when unsure which Claude Code capability fits a task, when about to single-thread large/cross-cutting/repetitive work, or when you or the user ask what Claude Code can do โ loads the full capability map (signal โ capability) and points to the deep-dive skills.
Use when building custom AI agents headlessly, embedding Claude Code tools in an app, or running scripted/cron agentsโneed SDK package names, setup, core API entry points, supported languages, and relation to Claude Code CLI and Messages...
Use when needing to understand or manage background agents, long-running tasks, polling, scheduling, or async work in Claude Code without blocking the session.
Use when you need to undo code edits, explore alternatives without losing a starting point, recover from a bad edit path, or restore previous conversation state โ press Esc Esc or run /rewind to open checkpoints menu.
Use when a task is too big for one context โ broad audits, multi-file migrations, multi-source research, or parallel multi-dimension review โ and you want to fan out and orchestrate many subagents deterministically with the Workflow tool (requires ultracode / explicit opt-in).
Use when deciding how to work on a task - choosing effort level, model, or fast mode to balance reasoning depth, speed, and token cost.
| name | claude-code-subagents |
| description | Use when you have research, exploration, a large review, or 2+ independent tasks to run โ spawn subagents (the Agent/Task tool), in parallel when possible, to do focused work and keep the main context clean. |
| user-invocable | true |
The Agent tool (the Task tool is a backward-compatible alias for it) spawns a subagent that runs with its own separate context and returns only its final message to you. Everything it read and reasoned about is discarded. That is the point: offload work whose intermediate tokens you don't want clogging the main thread.
For a single fact in a file you already know, just read it. Subagents pay off when the work is broad or parallel.
Call the Agent tool with a subagent_type and a self-contained prompt. The agent's final message comes back as the tool result (the user does not see it โ relay what matters).
run_in_background: true detaches a long-running agent; you're notified on completion (see claude-code-background-agents).isolation: "worktree" gives the agent its own git worktree โ use ONLY when multiple agents mutate files in parallel and would otherwise collide (it costs setup time + disk).SendMessage to its id/name; a fresh Agent call starts cold./agents manages reusable subagent definitions; /fork <directive> spawns a subagent that inherits your current conversation (the cheapest hand-off when the side task needs context you already have).general-purpose โ multi-step research, search, and execution when you're not sure you'll hit the answer fast.Explore โ read-only, breadth-first search across many files; returns the conclusion, not a review. Good for "where is X / what calls Y".Plan โ design an implementation plan (read-only).claude-code-guide โ questions about Claude Code / Agent SDK / Claude API features..claude/agents/ or a plugin), selectable by subagent_type.Route to fit the job, and remember your CLAUDE.md preference: Opus subagents for code review, architecture, debugging, and documentation; Haiku/Sonnet for file searches, simple refactors, and formatting. A subagent inherits the session model unless you override it โ override down for cheap mechanical work, up for hard reasoning.
Workflow tool) โ deterministic orchestration of many subagents with loops/pipelines/verification; reach for it when the fan-out is large or structured. See claude-code-dynamic-workflows.claude-code-background-agents.Explore/general-purpose agent and keep the bytes out of the thread.Write the agent's brief like a contract: what to do, what to return, and that its final message is the deliverable (not a chat reply).