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
Asynchronous sub-agents mean that the main agent can spawn sub-agents to handle time-consuming operations while it continues to interact with the user or handle other matters.
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.
In multi-agent collaborative architectures, the controller agent is responsible for task planning and scheduling, while sub-agents serve as execution units with specific tool access permissions and behavioral constraints.
Timeline (last 90 days)
Choosing a lightweight model for sub-agents instead of the default flagship model can lower the unit price and extend quota usage time.
The subagent pattern is particularly suited to tasks that are "long in process but short in conclusion," such as test runs and log analysis.
Each task may trigger multiple sub-agents, each billing at a high-cost model, causing extra credits to be exhausted after just two prompts.
A sub-agent's model configuration may hardcode a high-cost model due to template copying, third-party agent packages, or legacy configurations from earlier setups.
Hardcoding a third-party model ID in a sub-agent's configuration file causes the sub-agent to ignore the parent agent's Auto setting and always run and bill according to the specified model.
A sub-agent's model configuration is independent of the parent agent and determined by its own configuration file.
Cursor's model selector only sets the model for the parent agent and does not constrain the model selection of sub-agents.
The parent agent is the main agent the user interacts with directly in the chat interface, responsible for understanding requirements and breaking down tasks; sub-agents are execution units derived by the parent agent and can process subtasks in parallel.
The prompt includes a sub-agent self-check mechanism: one sub-agent only looks at the rendered result and reports visual defects, while GPU timing measures performance during a 60-second flight roam.
Setting clear, convergent task boundaries for a sub-agent is more economical than letting it explore freely; if a task only requires one or two tool calls, completing it directly in the main session is usually more economical.
40 more timeline events
All Facts (20)
Asynchronous sub-agents mean that the main agent can spawn sub-agents to handle time-consuming operations while it continues to interact with the user or handle other matters.
75%VerifiedClaude Code's sub-agents work in independent contexts and, upon completion, return only a summary of results to the main agent, achieving context isolation.
70%VerifiedIn multi-agent collaborative architectures, the controller agent is responsible for task planning and scheduling, while sub-agents serve as execution units with specific tool access permissions and behavioral constraints.
70%VerifiedThe sub-agent architecture breaks complex tasks into units that can be parallelized and isolated, allowing the main agent to choose models of different capability/cost according to task type, at the cost of introducing extra orchestration overhead and context-passing loss.
65%VerifiedIn the context of this article, an agent refers to an AI work unit given clear task boundaries that can independently read and write files; unlike chat-style AI, it is deliberately isolated and receives only a segmented fragment of the truth file and the task for the current chapter, so multiple agents do not interfere with one another.
65%VerifiedIf different models are needed for different tasks, a sub-agent should be launched to call the required model, so as to avoid breaking the cache of the main conversation.
65%Unverifiedv2.1.299 fixed an edge case where an MCP server named constructor or prototype could never connect.
70%UnverifiedSub-agents work in independent contexts and do not crowd the main conversation; each sub-agent starts with a brand-new conversation window and carries none of the main conversation's history.
60%UnverifiedIn the context of AI agents, each sub-agent has its own independent context window, tool-calling permissions, and task objectives.
60%UnverifiedChoosing a lightweight model for sub-agents instead of the default flagship model can lower the unit price and extend quota usage time.
50%UnverifiedThe subagent pattern is particularly suited to tasks that are "long in process but short in conclusion," such as test runs and log analysis.
50%UnverifiedEach task may trigger multiple sub-agents, each billing at a high-cost model, causing extra credits to be exhausted after just two prompts.
50%UnverifiedA sub-agent's model configuration may hardcode a high-cost model due to template copying, third-party agent packages, or legacy configurations from earlier setups.
50%UnverifiedA sub-agent's model configuration is independent of the parent agent and determined by its own configuration file.
50%UnverifiedThe parent agent is the main agent the user interacts with directly in the chat interface, responsible for understanding requirements and breaking down tasks; sub-agents are execution units derived by the parent agent and can process subtasks in parallel.
50%UnverifiedHardcoding a third-party model ID in a sub-agent's configuration file causes the sub-agent to ignore the parent agent's Auto setting and always run and bill according to the specified model.
50%UnverifiedCursor's model selector only sets the model for the parent agent and does not constrain the model selection of sub-agents.
50%UnverifiedThe prompt includes a sub-agent self-check mechanism: one sub-agent only looks at the rendered result and reports visual defects, while GPU timing measures performance during a 60-second flight roam.
50%UnverifiedSetting clear, convergent task boundaries for a sub-agent is more economical than letting it explore freely; if a task only requires one or two tool calls, completing it directly in the main session is usually more economical.
50%UnverifiedEach sub-agent independently issues its own requests outside the main conversation, has its own context window and its own billing chain, and its consumption is entirely incremental on top of the main session.
50%