AAI Agentic Handbook
Agents

Orchestrator–worker pattern

Senior levelReviewed Oct 2026In 4 interview questionsIn 1 post

A lead model splits a task into sub-tasks at run time, dispatches them to workers (calls or agents), then merges results — Anthropic's 4th pattern.

In plain English

In the orchestrator-worker pattern, one model acts as coordinator. It looks at the task, decides what pieces are needed, sends each piece to a worker (another model call or AI agent), and combines what comes back.

The difference from a fixed pipeline is that the pieces aren't known in advance: one request might need edits in 2 files, another in 20, and the orchestrator decides.

Analogy

A general contractor who walks the house, decides which trades are needed, books them in parallel, and signs off the combined work.

Common pitfall

Terse briefs that assume shared context. Each worker starts blank, so "look into the auth stuff" produces overlapping, off-target and confidently duplicated work.

How it actually works

Anthropic's "Building effective agents" (Dec 2024) lists orchestrator-workers between parallelization and evaluator-optimizer: like sectioning, except the sub-tasks are decided by the model at run time. The orchestrator does dynamic decomposition (Planning), writes a brief per worker (objective, scope, tools, output format, what not to do), dispatches workers in parallel, and synthesises: merge, de-duplicate, resolve conflicts, optionally verify.

Design levers: briefs must be self-contained because workers don't share the orchestrator's history; outputs should be structured and short so the orchestrator's context stays small; fan-out should scale with task complexity (Anthropic's research agent used 1 agent for fact-finding, 2–4 for comparisons, 10+ for broad research); and caps on fan-out and recursion depth are mandatory. Workers that write must partition the work (one service, one file set each) or conflicts land in the merge step.

What I'd ship on day one

Brief template with objective, inputs, tools, output schema, boundaries and effort budget; workers return ≤500-token structured results; fan-out cap 10, recursion depth 1; workers read-only unless each owns a disjoint write scope; synthesis step checks for conflicting facts.

Worked example

Financial-filings task: "Compare revenue recognition policies across our 6 largest customers' latest 10-Ks." The orchestrator finds 6 filings, spawns 6 workers, each briefed: "Read Note 2 of this filing; return policy summary ≤150 words, changes vs prior year, page cites; do not compare across companies." It merges 6 JSON results into one table and flags 2 customers that changed policy. 7 model contexts, ≈ 2.5 min, ≈ $1.80.

In the interview

Recommend it when the sub-tasks depend on the input and can run independently; contrast with sectioning, where you know the parts upfront. Emphasise the brief: "the orchestrator's real job is writing briefs a stranger could execute."

Follow-up to expect: "two workers return conflicting facts" — the synthesis step must detect conflicts, cite both sources, and either verify or surface the conflict.

Orchestrator
Worker A
Worker B
Worker C
1
brief: filing 1Orchestrator → Worker A
2
brief: filing 2Orchestrator → Worker B
3
brief: filing 3Orchestrator → Worker C
4
JSON, ≤150 wordsWorker A → Orchestrator
5
JSON, ≤150 wordsWorker B → Orchestrator
6
JSON, ≤150 wordsWorker C → Orchestrator
Decompose at run time, fan out with self-contained briefs, merge compact results.

Numbers worth knowing

Effort scaling used by Anthropic's research agent
1 / 2–4 / 10+ sub-agentsfact-finding / comparison / complex research, June 2025
Tool calls per sub-agent
10–15comparison tasks in the same write-up

How to decide

WhenDo this
Sub-tasks are known before the runUse plain parallel sectioning; no orchestrator call needed.
Sub-tasks depend on the input and are independentOrchestrator-workers with structured briefs.
Workers would edit overlapping files or recordsPartition write scope per worker, or keep writes in one agent.

Cost maths

Cost = orchestrator (plan + synthesis) + Σ workers. Filings example at $3 / $15 per M (illustrative, Oct 2026): plan 8k in / 1k out = $0.04; 6 workers × 80k in / 1.5k out = $1.58; synthesis 12k in / 2k out = $0.07. ≈ $1.70. Worker outputs capped at ~500 tokens keep synthesis input at 12k instead of ~500k if transcripts were forwarded.

Operating it

Time to scale up when…
  • Workers' outputs overlap >20%
  • Synthesis input exceeds ~30k tokens (compress worker outputs harder)
  • Fan-out hits the cap on >10% of runs
What to monitor
  • Fan-out per run vs task class (alert if simple tasks exceed 2 workers)
  • Conflicting-fact rate in synthesis (alert > 5%)
  • Merged-result pass rate on full checks vs per-worker pass rate (alert on any gap > 5 points)

When it goes wrong

What users saw

A code-change orchestrator produced a PR that failed to compile despite every worker reporting success.

How it was caught

CI on the merged diff; each worker's own tests had passed in isolation.

Root cause

Two workers both modified a shared logger.ts with incompatible signatures; briefs didn't assign file ownership.

Fix

Orchestrator now assigns disjoint file sets per worker and routes shared files to one worker; synthesis runs the full build before reporting success.

Sources

  1. Building effective agents — Anthropic (Schluntz & Zhang), 2024blog
  2. How we built our multi-agent research system — Anthropic, 2025blog

Check yourself

Three questions. Every option is explained once you answer.

1ConceptHow does orchestrator-workers differ from parallel sectioning in Anthropic's patterns?
2ScenarioWorkers each report success, but the merged PR fails to compile because two edited the same shared file. What's the fix?
3CalculationOrchestrator: plan $0.04 + synthesis $0.07. Six workers at 80k in / 1.5k out each, $3/$15 per M. About what's the total?