L102 Claude: Multi-Agent
- Why Multi-Agent?
- Hub-and-Spoke Architecture
- Isolated Context
- Coordinator's 5 Responsibilities
- Execution Patterns
- Dynamic Routing & Work Partitioning
- Iterative Refinement & Structured Handoffs
- Goal-oriented prompt design
1. Why Multi-Agent?
The three "pro" reasons are actually three different problems:
Fixed context window is a capacity problem. Partitioning is about fitting the work, not making it smarter. This ties straight back to the max_tokens / context concerns from earlier images.
Specialization is a quality problem. A focused system prompt outperforms one bloated prompt trying to be researcher, writer, and coder at once. This is the same "tighter scope = better output" principle behind good subagent design.
Parallelism is a latency/throughput problem. It only helps when subtasks are genuinely independent — dependent tasks gain nothing and add coordination overhead.
2. Hub-and-Spoke Architecture
Coordinator is the only node with authority — communication, error handling, and context all route through the hub, while subagents stay isolated and just execute
3. Isolated Context
Subagent start fresh, coordinator must explicitly pass all needed context
4. Coordinator's 5 Responsibilities
Flow:
Decompose -> Delegate -> Aggregate -> Evaluate -> Respond
Task Tool - 4 step delegation
A Task is a special tool call. When a coordinator wants a subagent to do something, it emits a tool_use block with type: "task". The key insight: a Task is just a tool whose implementation is another Claude agent rather than a function like a calculator or a database query.
6. Execution Patterns
Parallel vs Sequential vs Fork Sessions
P: Multiple task calls in one response
S: One task call per loop turn (wait for result)
FS: Same baseline, different paths, spawn multiple subagents from the same baseline context; each explores different directions. (essentially parallel execution with shared origin and deliberate divergence)
5. Dynamic Routing & Work Partitioning
Both attack the same enemy from different angles: redundant work. Routing prevents invoking agents you don't need; partitioning prevents the agents you do invoke from duplicating each other.
7. Iterative Refinement & Structured Handoffs
8. Goal-oriented prompt design
*DO: *
- Should do Goal + output format: what is expected from sub agent to produce in what format
- Constraints: what subagent MUST NOT do or access
Don't:
- Exact tool call sequence
- Over-constraining execution







Top comments (0)