AI GLOSSARY · AGENTS AND AGENT TOOLING

Subagent

Markdown version

Definition

A subagent is a separate AI worker that a main agent hands a task to. In Claude Code it runs in its own context window with its own instructions and tool access, and returns only a final summary.

Also called: subagents, sub-agent, sub-agents, Claude Code subagents, Claude subagent.

In plain language

A subagent is a helper that the main assistant sends off with a single job, such as searching a large codebase or running tests and reading the long logs. It works in its own separate memory, called a context window, so the clutter it produces stays out of your main conversation and only its short report comes back. Think of a manager delegating research to an assistant who returns a one-page summary. The main limitation is that it starts without knowing your conversation, so the instruction must contain everything it needs. The cost is that its work counts toward your usage limits, as Anthropic's documentation notes.

Technical definition

In Claude Code, a subagent is defined by a markdown file whose frontmatter sets fields such as name, description, tools (an allowlist), disallowedTools (a denylist), model and permissionMode, and whose body becomes its system prompt. Claude delegates automatically when a task matches the description, or you can name or @-mention the subagent. It starts with a fresh context window and does not see the parent conversation, except for a fork, which inherits it. Only the final report returns. By default subagents can spawn their own subagents up to three layers below the main conversation, a limit set by an environment variable.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Guide · Illustrative, not executed

    Claude Code Subagents: When to Delegate and How to Scope Tools

    What you see
    When a Claude Code subagent beats the main thread, how to write its definition file under .claude/agents/, and how to limit its tools with an allowlist.
    Why it exercises the concept
    It is the practical walk-through of this definition: a fresh context, a scoped tool list and a summary that returns to the main conversation.
  2. Skill by Skill Almanac · Illustrative, not executed

    subagent-design 47/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Helps you decide what to delegate, then write subagent definitions and briefs that work without the conversation.
    Why it exercises the concept
    Because a subagent does not see your conversation, the quality of the brief decides the result. This skill targets that.
  3. Skill by Jesse Vincent · Illustrative, not executed

    subagent-driven-development 30/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Executes a plan by handing independent tasks to separate subagents.
    Why it exercises the concept
    It shows subagents used for the purpose they exist for: splitting a plan into independent pieces, each worked on in its own context.
  4. Coding tool · Illustrative, not executed

    Claude Code

    What to try
    /agents
    What you see
    Claude Code's subagent management. Recent versions print a reminder about the agents folder; older versions open a wizard listing subagents.
    Why it exercises the concept
    It is where you check that a subagent you wrote is found and available.

How it shows up when you use agents

In Claude Code you meet subagents in two ways: built-in ones Claude picks for itself, and ones you define in a folder of markdown files. When a task matches a subagent's description, Claude hands it over, the subagent works in its own context window, and one summary comes back. This keeps long search results and logs out of your main session, which is the main reason to use one. A subagent can also be limited to fewer tools than the main session, such as read-only access.

What breaks when it is misunderstood:

  • Missing context. The subagent does not see your conversation, so a vague handoff produces a vague result. Write the brief as if for a stranger.
  • Unscoped tools. If you leave out the tools list, the subagent inherits the main session's tools, so a "reviewer" may be able to edit files.
  • Cost. Subagent requests count toward your usage limits, so splitting work into many is not free.

Next actions: start with the Claude Code subagents guide, use Subagent design to decide what to delegate, and keep interactive back-and-forth work in the main thread. For several agents coordinating, see multi-agent system.

Common confusions

  • Subagent versus agent skill. A subagent is a worker with its own context. An agent skill is instructions loaded into whichever agent needs them.
  • Subagent versus multi-agent system. A subagent is delegated to by a parent and reports back. A multi-agent system is the broader idea of several agents working together.
  • Myth. A subagent remembers the main conversation. It starts fresh, except for a fork, which Anthropic's documentation says inherits the parent conversation.
  • Summary versus transcript. Only the final report returns to the parent; the subagent's intermediate work stays in its own context.
Show all 14 related terms

Terms that mention Subagent

16 terms mention this one

Guides that mention Subagent

Show all 14 guides

More in Agents and agent tooling

Next steps

  1. Claude Code Subagents: When to Delegate and How to Scope Tools The long-form guide.
  2. subagent-design A skill that exercises it.
  3. Multi-agent system Related term.
  4. Agent orchestration Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-23. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; sources and example targets checked by claude-haiku-5-5 source check; claude-sonnet-5-5 editor pass on 2026-11-23. Last verified .

This entry is still in review, so it is not listed in search engines yet.

Change log (1)
  • : First version.