What is Subagent?
A subagent is a specialized AI assistant that Claude Code delegates a task to; it works in a separate context window with its own instructions and tool limits, and hands back only a summary.
Also written: sub-agent, custom subagent, delegated agent
Explained
In Claude Code, a subagent handles one kind of task separately from the main conversation. It has its own context window, system prompt, tool access and permissions. Because only a summary comes back, verbose material such as search results, logs and file contents stays out of the main conversation. Restricting tools and routing simple work to a cheaper model are other stated reasons to use one.
A subagent is defined as a markdown file with YAML frontmatter. The body becomes its system prompt, and only name and description are required. Other fields can limit tools, set a model, attach skills or MCP servers, or add hooks. The file's location sets its scope: managed settings, a command-line flag, the project's .claude/agents folder, the user's folder, or a plugin, with higher-priority locations winning on name clashes.
Claude can delegate automatically by matching a task to a subagent's description, or the user can ask for one by name, mention it, or start a whole session as that subagent. Claude Code ships built-in ones such as Explore, a read-only search agent, and Plan. As of the fetch (2026-10-26), subagents can by default spawn further subagents to a limited depth, which is configurable.
Primary source
Create custom subagents (code.claude.com), read Oct 26, 2026
This entry paraphrases the page above. Sources change; check it for the current wording.
Listings that use this
The 5 top-ranked listings tagged for Subagent. Rank weighs adoption, freshness, documentation and publisher identity; how we rank and grade. Money never changes the order.
- 0.885score
do
thedotmack
Execute a phased implementation plan using subagents.
SkillAFreshness: A★ 102.8KClaude Code +9 - 0.878score
chief-of-staff
mattpocock
Pursue a long-running goal in a single session by co-ordinating subagents.
SkillAFreshness: A★ 302.4KClaude Code +9 - 0.869score
langgraph-docs
langchain-aiOfficial
Fetches and references LangGraph Python documentation to build stateful agents, create multi-agent workflows, and implement human-in-the-loop patterns.
SkillAFreshness: A★ 30.6KClaude Code +9 - 0.867score
Pi Agent Core
Earendil
Minimal TypeScript agent harness with an agent runtime, multi-provider LLM API, terminal UI and coding agent CLI that users extend themselves.
HarnessAFreshness: A★ 117.6K↓ 5.1M/wk - 0.851score
Strands Agents
AWS
Open-source Python and TypeScript SDK for model-driven agents, with tools, MCP, multi-agent patterns and streaming.
HarnessAFreshness: A★ 8.9K↓ 8.9M/wk
Related
Cite this page
What is Subagent?. Agent Mart. https://agentmart.dev/glossary/subagent (last updated 2026-10-26)
Written Oct 26, 2026, updated Oct 26, 2026. All glossary terms