Subagent
An auxiliary agent used in AI-assisted programming to isolate exploration tasks, preventing contamination of the main agent's context and keeping the main context clean.
Core Facts
Timeline (last 90 days)
The one-agent-per-project-plus-sub-agents model has the advantage of concentrated context and simple coordination, but the disadvantage is that a single agent easily becomes a bottleneck, and dependencies among sub-agents still need to be scheduled by the main agent.
By default, Claude Code's subagents do not share memory with each other and do not communicate directly; all coordination must be relayed through the main agent.
In the demo, Ivan launched three sub-agents simultaneously, respectively responsible for the API, the data ingestion pipeline and the dashboard, advancing the implementation in parallel.
Claude Code's sub-agents work in independent contexts and, upon completion, return only a summary of results to the main agent, achieving context isolation.
Sub-agents usually run in independent context windows, and the parent agent's conversation history is not automatically visible to the sub-agent.
If the parent agent passes incomplete information when spawning a sub-agent, the sub-agent may make wrong judgments based on partial information, and the error propagates up the call chain.
A reasonable onboarding path for adopting the Claude Agent SDK is: first get a single agent plus structured output working, then introduce SessionStore for state persistence, and only then split out sub-agents; skills and plugins should be abstracted only when a second reuse need arises.
Switching models via /model or startup parameters does not override the model used by sub-agents during task execution.
Sub-agents independently select models based on their own assessment of subtask complexity rather than inheriting the model setting of the main session, which causes multiple models that the user never manually selected to appear in usage reports.
The sub-agent mechanism handles subtasks by spawning child agents; the main agent decomposes complex problems, delegates them, and then aggregates the results, thereby keeping its own context clear.
4 more timeline events
All Facts (15)
Claude Code's sub-agents work in independent contexts and, upon completion, return only a summary of results to the main agent, achieving context isolation.
65%UnverifiedThe one-agent-per-project-plus-sub-agents model has the advantage of concentrated context and simple coordination, but the disadvantage is that a single agent easily becomes a bottleneck, and dependencies among sub-agents still need to be scheduled by the main agent.
50%UnverifiedBy default, Claude Code's subagents do not share memory with each other and do not communicate directly; all coordination must be relayed through the main agent.
50%UnverifiedSub-agents usually run in independent context windows, and the parent agent's conversation history is not automatically visible to the sub-agent.
50%UnverifiedA reasonable onboarding path for adopting the Claude Agent SDK is: first get a single agent plus structured output working, then introduce SessionStore for state persistence, and only then split out sub-agents; skills and plugins should be abstracted only when a second reuse need arises.
50%UnverifiedIf the parent agent passes incomplete information when spawning a sub-agent, the sub-agent may make wrong judgments based on partial information, and the error propagates up the call chain.
50%UnverifiedSub-agents independently select models based on their own assessment of subtask complexity rather than inheriting the model setting of the main session, which causes multiple models that the user never manually selected to appear in usage reports.
50%UnverifiedSwitching models via /model or startup parameters does not override the model used by sub-agents during task execution.
50%UnverifiedThe sub-agent mechanism handles subtasks by spawning child agents; the main agent decomposes complex problems, delegates them, and then aggregates the results, thereby keeping its own context clear.
50%UnverifiedUsing sub-agents is worthwhile only when all three conditions are met simultaneously: high-volume output, no further need for the details, and the session will continue for many more rounds.
50%UnverifiedSub-agents do not save tokens but rather shift them, as each sub-agent has its own independent context window isolated from the main session.
50%UnverifiedSubagents can only report results unidirectionally and cannot discuss with each other, whereas agent team members can send messages directly to one another.
50%UnverifiedA subagent is an independently running Claude instance with its own context and task focus, and up to 49 can run in parallel.
50%Unverified在AI代理语境下,每个子代理拥有独立的上下文窗口、工具调用权限和任务目标
50%UnverifiedIn the demo, Ivan launched three sub-agents simultaneously, respectively responsible for the API, the data ingestion pipeline and the dashboard, advancing the implementation in parallel.
50%