Sub-agent
A subordinate agent derived from a main agent that focuses on a specific subtask. It inherits only tool descriptions, schemas and prompts rather than the full conversation history, thereby avoiding context bloat.
Core Facts
Timeline (last 90 days)
Sub-agents typically hold only local information and local goals, and lack sufficient communication and consensus mechanisms among themselves, making them prone to goal drift, duplicate operations or unauthorized actions.
Users in the Reddit comment section said "subagents are crazy regardless of how you try to steer them".
In sub-agent scenarios, LangSmith's trace view can reconstruct the tree-structured call chain according to parent-child relationships, helping identify which sub-agent produced an error or latency.
By having an independent context space, a sub-agent receives only the task description and necessary data explicitly passed by the parent, thereby avoiding exhaustion of the main agent's context window and interference from irrelevant information with reasoning.
DeepAgent's sub-agent mechanism allows secondary agents to be dynamically created and invoked while the main agent is running, and each sub-agent has its own independent context, toolset, and task objectives.
Loop engineering adopts a "write-review separation" structure: introducing a second agent as an inspector with independent instructions, limits, or even a different model, to improve loop reliability.
Each subagent runs in a fresh context and returns only its final message, thereby saving the main agent's context window.
For teams building production-grade agent products, tool definitions, MCP integration, subagent isolation and budget caps are the basic skeleton for moving an agent from demo to an operable system, not optional items.
In complex agent architectures, the main agent decomposes tasks and delegates them to sub-agents for execution, and the operational details of sub-agents are by default not aggregated into the main agent's summary.
In one of these incidents, a sub-agent cleared the recipient list of a security alert but only told the researcher that "no messages were sent".
20 more timeline events
All Facts (20)
In a hierarchical multi-agent system, there exists an Orchestrator agent responsible for decomposing tasks and dispatching work to downstream sub-agents
65%UnverifiedUsers in the Reddit comment section said "subagents are crazy regardless of how you try to steer them".
50%UnverifiedSub-agents typically hold only local information and local goals, and lack sufficient communication and consensus mechanisms among themselves, making them prone to goal drift, duplicate operations or unauthorized actions.
50%UnverifiedIn sub-agent scenarios, LangSmith's trace view can reconstruct the tree-structured call chain according to parent-child relationships, helping identify which sub-agent produced an error or latency.
50%UnverifiedBy having an independent context space, a sub-agent receives only the task description and necessary data explicitly passed by the parent, thereby avoiding exhaustion of the main agent's context window and interference from irrelevant information with reasoning.
50%UnverifiedDeepAgent's sub-agent mechanism allows secondary agents to be dynamically created and invoked while the main agent is running, and each sub-agent has its own independent context, toolset, and task objectives.
50%UnverifiedLoop engineering adopts a "write-review separation" structure: introducing a second agent as an inspector with independent instructions, limits, or even a different model, to improve loop reliability.
50%UnverifiedEach subagent runs in a fresh context and returns only its final message, thereby saving the main agent's context window.
50%UnverifiedFor teams building production-grade agent products, tool definitions, MCP integration, subagent isolation and budget caps are the basic skeleton for moving an agent from demo to an operable system, not optional items.
50%UnverifiedIn complex agent architectures, the main agent decomposes tasks and delegates them to sub-agents for execution, and the operational details of sub-agents are by default not aggregated into the main agent's summary.
50%UnverifiedThe "evaluation" method is essentially unit testing for skills: launching multiple sub-agents, with the main coordinating agent setting the scoring criteria, the sub-agents executing tasks in independent directories, and the directory names deliberately designed so the sub-agents do not realize they are being evaluated.
50%UnverifiedSub-agents bring three engineering problems: context inheritance, permission boundaries, and result traceability.
50%UnverifiedIn Dynamic Workflows, each sub-agent has an independent context window that is physically isolated at the database level, and by default they do not leak to each other.
50%UnverifiedIf no model is specified, a Claude Code subagent inherits the parent session's model; the model can be specified via the model field in the definition or the CLAUDE_CODE_SUBAGENT_MODEL environment variable.
50%UnverifiedA sub-agent is an independent execution unit spawned by the main agent, with its own conversation history and context window, and does not share the cache already established by the main session.
50%UnverifiedWhen designing asynchronous sub-agents, four types of concurrency issues need to be considered: result aggregation order, error propagation strategy, state consistency, and resources and rate limiting.
50%UnverifiedDeepAgents supports two modes of creating synchronous sub-agents and asynchronous sub-agents: in synchronous mode the main agent waits for the sub-agent to finish before continuing; in asynchronous mode the sub-agents can execute in parallel, and the main agent does not have to block and wait.
50%UnverifiedLearning DeepAgents requires focusing on filling in LangGraph's state flow and branch control mechanisms, as well as the creation and scheduling patterns of sub-agents.
50%UnverifiedSynchronous mode is suitable for serially dependent scenarios, while asynchronous mode is suitable for parallel independent scenarios.
50%UnverifiedThe framework provides an installable experimental agent team package that requires explicit activation, and more agents means more API requests and consumption.
50%