CONCEPT Dependency decides the shape
Whether sub-agents run at the same time or one-after-another is dictated by dependency, not preference. If a sub-task needs another's output, it must wait — that's sequential. If sub-tasks are independent, run them in parallel to cut wall-clock time. Sequential agents add latency additively; parallel agents overlap, so the total is roughly the slowest one.
| Case | Run how | Wall-clock | Example |
|---|---|---|---|
| Independent sub-tasks | Parallel (fan-out) | ≈ max(sub-tasks) | Research 8 companies at once |
| Dependent sub-tasks | Sequential (pipeline) | ≈ sum(sub-tasks) | research → outline → draft → edit |
CONCEPT The latency math
Say three sub-tasks take 4s, 6s, and 5s.
- Sequential: latency ≈ 4 + 6 + 5 = 15s (additive).
- Parallel: latency ≈ max(4, 6, 5) = 6s (overlap; bounded by the slowest).
Parallel only helps if the sub-tasks are truly independent. If B depends on A, you're forced into A-then-B and pay 4 + 6 no matter what. Token cost is the same either way (same work) — parallelism buys time, not tokens.
DIAGRAM Both shapes side by side
CODE Fan-out independent sub-agents concurrently
Independent specialist calls run in threads; wall-clock collapses to the slowest one.
from concurrent.futures import ThreadPoolExecutor def research(company): r = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, system="You are a research specialist.", messages=[{"role": "user", "content": f"Profile: {company}"}], ) return company, "".join(b.text for b in r.content if b.type == "text") companies = ["Acme", "Globex", "Initech", "Umbrella"] # independent → parallel # Parallel: wall-clock ≈ the single slowest call, not the sum. with ThreadPoolExecutor(max_workers=len(companies)) as pool: findings = dict(pool.map(research, companies)) # Sequential would be: for c in companies: research(c) → latency adds up. # A DEPENDENT step (needs all findings) must wait — run it after the fan-out. summary = client.messages.create( model="claude-opus-4-8", max_tokens=2048, messages=[{"role": "user", "content": f"Synthesize these profiles:\n{findings}"}], # depends on all → sequential )
TRADE-OFFS Parallel vs. sequential
✅ Parallel (independent)
- Cuts wall-clock to ≈ the slowest sub-task
- Great for wide, independent fan-out
- Same token cost, far less waiting
⚠️ Sequential (dependent)
- Latency is additive — sums up across stages
- Required when a stage needs a prior output
- Simpler to reason about and trace
EXAM TRAPS
PRACTICE
Q1 · Three sub-tasks take 3s, 8s, 4s and are independent. Parallel wall-clock?
≈ 8s — the slowest one. Sequential would be 3 + 8 + 4 = 15s. Independence lets them overlap.
Q2 · A pipeline is research → outline → draft. Can you parallelise it to go faster?
No — each stage depends on the previous one's output, so it must run sequentially. Latency stays additive; there's no independence to exploit.
Q3 · A manager wants parallel fan-out "to lower our bill." Right reason?
No. Fan-out reduces latency, not token cost — the same sub-agents run either way. Use it to cut wall-clock, not spend.