Manager/Supervisor Agents and Subagent Delegation
CoreDesign manager/supervisor and subagent hierarchies · Difficulty 2/5
Explanation
The Manager/Subagent Pattern
A manager (orchestrator/supervisor) agent coordinates specialized subagents. Each Subagent runs in its own context window and returns only a condensed result to the manager. This is both an architecture pattern and a context-management technique: it keeps the manager's context clean while letting subagents explore deeply.
Why Subagents Help
- Context isolation -- a research Subagent can read thousands of tokens and hand back a short summary, so the manager never sees the raw noise. This is the *defining* benefit of the pattern.
- Specialization -- each Subagent has a focused system prompt, tool set, and (optionally) model tier suited to its subtask.
- Parallelism -- independent subtasks can run concurrently across subagents.
The Tradeoff
The cost is coordination overhead and multiplied token usage: every Subagent call is its own set of model calls, and someone (the manager, or the developer) has to reconcile the subagents' results into a coherent whole. Reserve multi-agent hierarchies for tasks that are genuinely separable and heavy enough to justify that overhead -- a single well-scoped agent or a simple workflow is often sufficient for lighter tasks.
Common exam traps
- Treating subagents as merely "more prompts" or a way to parallelize prompt text. Their defining benefit is a separate context window -- spawning subagents to isolate context is a first-class fix for context bloat, not just a division of labor.
- Reaching for a manager/Subagent hierarchy by default. The pattern earns its coordination overhead and multiplied cost only when the subtasks are genuinely separable and heavy; for a small, well-defined task it is over-engineering.
Key Takeaways
- A manager/supervisor agent coordinates subagents, each with its own context window, returning only condensed results
- Context isolation -- not just delegation -- is the defining benefit of the subagent pattern
- Subagents also enable specialization (focused prompt, tools, model tier) and parallelism across independent subtasks
- Multi-agent hierarchies add coordination overhead and multiply token usage, so reserve them for genuinely separable, heavy tasks
- Subagent isolation is a first-class technique for fixing context bloat, not merely 'more prompts'
Glossary Terms
A multi-agent architecture where a central coordinator manages specialized subagents using hub-and-spoke communication. The coordinator handles task decomposition, routing, and result aggregation. Subagents never communicate directly with each other, keeping the system auditable.
A Claude instance spawned by an orchestrator to handle one bounded subtask in complete context isolation. Each subagent starts with a fresh context window — the orchestrator's history is never inherited — and is invoked via the [Task tool](/glossary/task-tool). The subagent runs its own full [Agentic Loop](/glossary/agentic-loop), then returns a single structured result to the orchestrator.
The built-in Agent SDK tool used to invoke a subagent. Takes a task description, available tools, and optional context. The subagent runs its own agentic loop in an isolated context and returns its final result. The primary mechanism for multi-agent delegation.
Related Concepts
The Five Workflow Composition Patterns
Prompt chaining = fixed sequence of LLM calls, optionally gated between steps
Recurring Agent Patterns and Abstraction Frameworks
The tool-use loop -- emit tool_use, execute, return tool_result, continue -- is the core agent cycle, grounded in real environment feedback