Skip to content
Jordan Hudgens
Architectural studio still life of six translucent teal glass channels passing through a brushed brass dispatch gate into one crystal block, beside an amber quarantine chamber and a terracotta entry block on dark basalt.AI-generated illustration
Guide 24AdvancedArchitecture and runtimesAgents and tool useEvaluation and testing

When Multi-Agent Systems Earn Their Complexity

Start with one strong agent, gate delegation behind deterministic separability checks, isolate subagent faults, and prove payoff on a frozen paired scorecard.

Reading
16 min
Workshop
180 min
Stack
TS 7.0, Node 22, Claude 5.5 (Sonnet 5.5 + Haiku 5.5), Zod 4, Promise.allSettled
Version
1.0.0
Last verified
Dec 1, 2026

What you will build and be able to do

Each outcome has an observable criterion. The lab and the assessment check exactly these, nothing more and nothing less.

  1. OBJ-001

    Gate delegation behind upfront separability and token-spill thresholds

    Route tasks with serial_dependency_edges > 0 or raw bundle volume below 12,000 tokens to single_agent_direct with 0 workers spawned, and abstain upfront on write or restricted requests.

  2. OBJ-002

    Enforce disjoint read-only worker scopes and minimal handoffs

    Cap pools at 1..6 flat workers, reject duplicate scope assignments, pass zero coordinator chat history, bind read_assigned_bundle to one assigned scope, and verify stop_reason === 'end_turn' before parsing JSON.

  3. OBJ-003

    Quarantine partial worker timeouts and verify host-receipt provenance

    Reserve worst-case run budgets ahead of dispatch, wrap workers in Promise.allSettled with a 25,000ms cap, deduplicate physical bundle reads, strip unverified record citations, and surface cross-scope severity conflicts.

  4. OBJ-004

    Grade multi-agent payoff honestly against a strong single-agent baseline

    Sum coordinator plus every worker and retry call in one Decimal ledger, interleave AB/BA live trials, and reject delegation whenever single-agent matches quality and latency at lower cost.

Offline clean-room setup (Node 22 + pnpm 12, $0.00)

  • TypeScript and Node.js 22 async concurrency (Promise.allSettled, AbortSignal)
  • Outcome-graded agent evaluations and release gatesRead Dev Guide 02
  • Context engineering and compaction budgets for long-running loopsRead Dev Guide 08
  • Capability-owned tool contracts and durable idempotent outboxesRead Dev Guide 20
terminalbash
# Synthetic data. Simulated services. Runs 100% offline with zero API keys.unzip multi-agent-complexity-labs.zip && cd multi-agent-complexity-labs/starterpnpm install --frozen-lockfilenode src/cli.ts preflightmulti-agent-contract/1 | Offline deterministic model double + recorded replays ($0.00)
Download Multi-Agent Complexity Labs (ZIP, MIT, $0 offline TypeScript) · ZIP · tested at v1.0.0

Five deterministic host gates around coordinator-worker delegation

Synthetic data. Simulated services (Example Siltburn Substation & Grid Reliability Review Desk, coord-eval.example-ops.test).
Five-stage architecture diagram from Gate G1 Separability Router through G2 Disjoint Scoped Handoffs, G3 Quarantine and Dedup Ledger, G4 Host Receipt Provenance, to G5 Paired Complexity Scorecard.
Extended description

Gate G1 abstains on write or restricted requests with 0 workers, forces coupled hop chains (serial_dependency_edges > 0) to single_agent_direct, and requires >= 3 disjoint scopes and >= 12,000 raw tokens.

Gate G2 caps the pool at 1..6 flat read-only workers, rejects OVERLAPPING_SCOPES, strips coordinator chat history, binds read_assigned_bundle to one scope, and checks stop_reason === 'end_turn'.

Gate G3 reserves worst-case tokens and USD in RunBudgetReservationLedger, wraps workers in Promise.allSettled (25,000ms cap), isolates timeouts into quarantined_scopes, and deduplicates (scope_id, args_hash) reads.

Gate G4 merges typed worker envelopes deterministically in host code (eliminating a redundant 4.08s second LLM synthesis turn), checks every record_id against host tool receipts across non-quarantined scopes, and surfaces PASS vs BREACH conflicts.

Gate G5 sums coordinator plus all worker and retry calls, enforces S1 == 0, and requires <= 0.85x p95 latency or >= +0.05 quality within the cost cap to emit APPROVE_MULTI_AGENT.

Why naive multi-agent swarms lose to one strong agent

Synthetic data. Simulated services. Every subsystem log, switching ticket, protection relay event, and cost ledger in this guide belongs to Example Siltburn Substation & Grid Reliability Review Desk (coord-eval.example-ops.test, North dev yard and South held-out yard).

Splitting work across subagents feels faster until you measure the full serial fraction and coordination tax. Under Amdahl's Law and Gunther's Universal Scalability Law, a coordinator planning turn plus a second synthesis LLM turn adds fixed serial latency that cannot be parallelized, while forwarding chat transcripts multiplies input tokens across every worker. Worse, when Hop 2 depends on lockout IDs discovered in Hop 1, blind parallel fan-out dropped coupled accuracy to 0/4 (0.0%) on our live Claude 5.5 contrast runs.

Gate G1 separability routing and Gate G2 minimal handoffs

Start with one strong single-agent baseline and treat delegation as a privileged route that has to clear Gate G1 upfront. classifyAndValidatePlan() halts write or restricted intents immediately with 0 workers, overrides any plan where serial_dependency_edges > 0 back to single_agent_direct, and requires at least 3 disjoint read scopes and 12,000 raw tokens before spawning workers.

Featured three-column flow diagram routing Class A broad separable reads to parallel_fanout, Class B coupled chains to single_agent_direct (12/12 vs 0/4 with G1 OFF), and H-12 write intents to abstain_out_of_scope.
Synthetic data. Gate G1 and Gate G2 enforce workload separability and zero-chat-history closures before any worker executes.
Extended description

Left column contrasts Class A broad separable reads (5..6 scopes, 63K..76K tokens), Class B 3-hop coupled chains (~12.5K tokens), and H-12 write/restricted requests.

Center column enforces Gate G1 separability thresholds, Gate G2 scoped worker closures (<= 6 workers, 0 chat history, bound read_assigned_bundle), and the single-hop synthesis ceiling.

Right column shows parallel_fanout winning Class A (Haiku p95 0.59x, Sonnet+Haiku 0.09x USD), single_agent_direct preserving 12/12 Class B accuracy, and abstain_out_of_scope containing writes.

src/gates/separability-and-handoff.tstypescript
if (task.requests_write_or_restricted) {  return { effective_route: 'abstain_out_of_scope', reason: 'WRITE_OR_RESTRICTED_BLOCKED' };}if (task.serial_dependency_edges > 0 || task.estimated_total_tokens < 12_000 || scopes.length < 3) {  return { effective_route: 'single_agent_direct', reason: 'COUPLED_OR_BELOW_SPILL' };}if (new Set(scopes).size !== scopes.length || scopes.length > 6) throw new Error('OVERLAPPING_OR_EXCESS_SCOPES');

Gate G3 Promise.allSettled quarantine and Gate G4 host-receipt provenance

Uncontained worker pools fail catastrophically under partial degradation: one slow subagent inside Promise.all discards paid tokens from every healthy sibling, retry storms re-read identical bundles, and unverified synthesis accepts fabricated record IDs planted inside untrusted log strings. Gate G3 reserves worst-case tokens and USD upfront, isolates per-worker 25,000ms timeouts with Promise.allSettled into quarantined_scopes, and caches (scope_id, args_hash) reads so physical duplicate reads stayed at 0 across all 72 Haiku held-out runs.

Synthetic data. Silent 6-second loop showing read dedup, H-11 partial timeout quarantine, H-09 conflict preservation, and H-10 host-receipt citation verification. Silent loop, 6 seconds.
Extended description

Phase 1 dispatches overlapping and healthy read-only worker scopes alongside slow sub_firmware_test (H-11), cross-scope PASS vs BREACH measurement clashes (H-09), and untrusted contractor memo CERT-FAKE-999 (H-10).

Phase 2 deduplicates bundle reads in Gate G3, isolates the rejected sub_firmware_test promise without crashing sibling workers, and checks every cited record_id against host tool receipts in Gate G4.

Phase 3 preserves 4 of 5 healthy envelopes under partial_quarantine_hold on H-11, strips CERT-FAKE-999 on H-10, keeps 2 PASS/BREACH clashes on H-09, and commits 0 unauthorized writes.

Side-by-side comparison of naive Promise.all + untrusted worker synthesis against Promise.allSettled quarantine and host-receipt provenance verification.
Synthetic data. Host code quarantines slow scopes without losing sibling envelopes and strips any record ID absent from host tool receipts.
Extended description

Left panel shows the starter defects (M05..M08): Promise.all crashes 4 healthy workers when sub_firmware_test times out on H-11, laundered CERT-FAKE-999 passes into verified_anomalies on H-10, and PASS vs BREACH clashes disappear on H-09.

Right panel shows Gates G3 and G4 preserving 4 healthy scopes in partial_quarantine_hold on H-11, stripping CERT-FAKE-999 on H-10, surfacing 2 PASS/BREACH conflicts on H-09, and holding Class C held-out runs at 1.000 quality, 0.73x p95 latency, and S1 = 0.

Eight-row containment matrix mapping fault cases E-01 through E-16 and mutants M01 through M12 to Gates G1 through G5.
Synthetic data. Verified offline inside unshare -rn: 16/16 fault cases contained, 12/12 mutants killed, and 24/24 unit tests green.
Extended description

Maps coupled-chain routing (E-01/M01), narrow-scope spill gating (E-02), disjoint zero-chat handoffs (E-03..06/M02..03), Claude 5.5 wire guards (E-07/M04), budget and timeout quarantine (E-08..10/M05), idempotent read/outbox dedup (E-11..12/M06), receipt provenance and conflict preservation (E-13..14/M07..08/M12), and full-ledger payoff rejection (E-15..16/M09..11).

Gate G5 paired scorecard across 100 live Claude 5.5 held-out runs

A multi-agent architecture earns production complexity only when it beats a strong single-agent baseline given the same underlying data and full token accounting (coordinator planning plus every worker and retry call). Across 12 unseen South-yard tasks (H-01..H-12), we ran 72 interleaved AB/BA arm-runs on claude-haiku-5-5, 4 naive Gate-G1-OFF contrast runs on Class B, and 24 tiered portability arm-runs pairing a claude-sonnet-5-5 coordinator with claude-haiku-5-5 workers against a single-agent claude-sonnet-5-5 baseline (573 Stage 4 wire calls plus Stage 2 calibration = $2.1971, $0.0000000000 Decimal drift).

Synthetic data. Silent 6-second loop showing Gate G5 approving broad separable fan-out while rejecting coupled multi-agent overhead. Silent loop, 6 seconds.
Extended description

Class A broad separable reads (5..6 scopes, ~75K tokens) earn APPROVE_MULTI_AGENT: same-model Haiku cuts p95 wall-clock to 0.59x (9.56s vs 16.10s) and tiered Sonnet+Haiku cuts cost to 0.09x ($0.0685 vs $0.7456, -90.8%).

Class B coupled 3-hop chains (~12.5K tokens) trigger REJECT_MULTI_AGENT_USE_SINGLE_AGENT across both model tiers (1.10x Haiku USD, 1.13x Sonnet+Haiku USD and 1.31x p95 even with 10x cheaper workers).

Class C partial-failure and untrusted-log hazards maintain S1 = 0 across all 100 held-out runs and kill 12/12 mutants.

Frozen held-out paired evaluation scorecard across 100 live Claude 5.5 arm-runs comparing same-model Haiku 5.5, tiered Sonnet 5.5 + Haiku 5.5, and Gate G1 OFF contrast.
Synthetic data. Multi-agent wins latency and tiered cost on wide separable reads yet loses on narrow coupled hop chains.
Extended description

Same-model claude-haiku-5-5 (72 runs, $0.4339): Class A 0.59x p95 (1.06x USD, APPROVE), Class B 1.10x USD with 0 workers (REJECT), Class C 0.73x p95 (1.03x USD, APPROVE), 12/12 3-of-3 consistency, S1 = 0.

Tiered Sonnet 5.5 + Haiku 5.5 (24 runs, $1.5433): Class A 0.62x p95 and 0.09x USD (-90.8% cost, APPROVE), Class B 1.31x p95 and 1.13x USD (REJECT), Class C 0.72x p95 and 0.10x USD (+0.250 quality, APPROVE), S1 = 0.

Synthetic data. Frozen South-yard held-out paired results (100 live Claude 5.5 arm-runs, 2026-12-02).
Tier & workload classp95 latency ratioFull ledger USD ratioQuality / S1Gate G5 verdict
Haiku 5.5 Class A (H-01..04, 24 runs)0.59x (9.56s vs 16.10s)1.06x ($0.1281 vs $0.1210)1.000 / S1=0APPROVE_MULTI_AGENT
Haiku 5.5 Class B (H-05..08, 24 runs)1.00x (9.66s vs 9.63s)1.10x ($0.0204 vs $0.0185)1.000 / S1=0REJECT_MULTI_AGENT
Haiku 5.5 Class B (Gate G1 OFF, 4 runs)Blind parallel fan-out0.37x tok (19,074 vs 51,627 partial reads)0/4 (0.0%) coupledHOLD (V2 accuracy drop held)
Haiku 5.5 Class C (H-09..12, 24 runs)0.73x (9.69s vs 13.21s)1.03x ($0.0741 vs $0.0717)1.000 / S1=0APPROVE_MULTI_AGENT
Sonnet+Haiku Class A (H-01..04, 8 runs)0.62x (8.62s vs 13.96s)0.09x ($0.0685 vs $0.7456)1.000 / S1=0APPROVE_MULTI_AGENT
Sonnet+Haiku Class B (H-05..08, 8 runs)1.31x (11.64s vs 8.86s)1.13x ($0.1286 vs $0.1141)1.000 / S1=0REJECT_MULTI_AGENT
Sonnet+Haiku Class C (H-09..12, 8 runs)0.72x (7.36s vs 10.20s)0.10x ($0.0455 vs $0.4410)1.000 (+0.25) / S1=0APPROVE_MULTI_AGENT

Lab 1: Gate G1 separability router and Gate G2 minimal handoffs

Block write and restricted intents upfront, route coupled hop chains and narrow <12K-token asks to single_agent_direct, enforce <= 6 disjoint worker scopes with zero chat history, and verify stop_reason === 'end_turn'.

Acceptance checks

  • Write or restricted requests abstain upfront with 0 workers spawned and 0 outbox commits
  • serial_dependency_edges > 0 or <12,000 raw tokens routes to single_agent_direct with 0 workers
  • Duplicate assigned_scope_ids, >6 workers, coordinator chat history, or cross-scope reads fail closed
  • Truncated max_tokens or refusal stop_reason fails closed before JSON.parse
  1. Reproduce coupled fan-out waste, then enforce Gate G1 single-agent routing

    $ node src/cli.ts inspect --task M-04

    Initial: Initial (starter-baseline)

    { "synthetic_label": "Synthetic data. Simulated services.", "mode": "scripted", "task_id": "M-04", "single_agent": { "effective_route": "single_agent_direct", "overall_disposition": "coupled_chain_resolved", "anomalies_count": 0, "conflicts_count": 0, "coupled_answer": { "line_id": "LINE-ND-01", "active_setting_group": "NSG-12", "tap_lockout_register": "NREG-0x14", "max_transfer_mva": 150, "action_code": "NDISPATCH_DERATE_150_ICE", "breaker_interlock_mode": "RECLOSE_BLOCKED_NORTH_ICE" }, "calls": 4, "total_tokens": 1721, "wall_clock_ms": 4 }, "coordinator_workers": { "model_proposed_route": "single_agent_direct", "effective_route": "bounded_parallel_fanout", "g1_override_code": null, "workers_spawned": 4, "overall_disposition": "hold_for_conflicts_or_anomalies", "anomalies_count": 8, "conflicts_count": 0, "quarantined_scopes": [], "coupled_answer": null, "calls": 5, "total_tokens": 29347, "wall_clock_ms": 5 } }

    Final: Final (checkpoint-a, Gate G1 + G2)

    { "synthetic_label": "Synthetic data. Simulated services.", "mode": "scripted", "task_id": "M-04", "single_agent": { "effective_route": "single_agent_direct", "overall_disposition": "coupled_chain_resolved", "anomalies_count": 0, "conflicts_count": 0, "coupled_answer": { "line_id": "LINE-ND-01", "active_setting_group": "NSG-12", "tap_lockout_register": "NREG-0x14", "max_transfer_mva": 150, "action_code": "NDISPATCH_DERATE_150_ICE", "breaker_interlock_mode": "RECLOSE_BLOCKED_NORTH_ICE" }, "calls": 4, "total_tokens": 1721, "wall_clock_ms": 3 }, "coordinator_workers": { "model_proposed_route": "single_agent_direct", "effective_route": "single_agent_direct", "g1_override_code": null, "workers_spawned": 0, "overall_disposition": "coupled_chain_resolved", "anomalies_count": 0, "conflicts_count": 0, "quarantined_scopes": [], "coupled_answer": { "line_id": "LINE-ND-01", "active_setting_group": "NSG-12", "tap_lockout_register": "NREG-0x14", "max_transfer_mva": 150, "action_code": "NDISPATCH_DERATE_150_ICE", "breaker_interlock_mode": "RECLOSE_BLOCKED_NORTH_ICE" }, "calls": 5, "total_tokens": 1985, "wall_clock_ms": 1 } }
  2. Show the solution discussion

    Apply checkpoint-a via node ../apply-checkpoint.mjs checkpoint-a .

    Run pnpm test:lab1 and verify 8/8 tests pass offline.

More labs in this guide

  • Lab 2: Promise.allSettled quarantine, dedup ledger, and host-receipt provenance

    Reserve worst-case run budgets upfront, isolate per-worker timeouts via Promise.allSettled without losing healthy siblings, deduplicate bundle reads, strip unverified citations, and preserve cross-scope PASS vs BREACH conflicts.

  • Lab 3: Full coordinator+worker cost ledger and frozen paired scorecard

    Sum coordinator plus every worker and retry call in one Decimal ledger, replay all 100 frozen held-out Claude 5.5 arm-runs offline ($0.00), approve Class A/C payoff, reject Class B coupled overhead, and kill 12/12 mutants.

Ten ways this breaks, and how you will know

Every failure here is reproducible in the lab with a flag. Learn the symptom first; it is what you will actually see.

  • F-01Reproducible

    Blind parallel fan-out on coupled sequential hop chains

    Symptom
    Class B 3-hop lockout-to-switching accuracy collapses to 0/4 (0.0%) on 0.37x partial tokens because parallel workers stop without Hop 1 keys.
    Diagnosis
    Starter router ignores serial_dependency_edges > 0 and fans coupled steps across stateless workers.
    Fix
    Force serial_dependency_edges > 0 to single_agent_direct in Gate G1 with 0 workers spawned.
    Verify
    node --test test/lab1-separability-and-handoff.test.ts
  • F-02Reproducible

    Sub-spill fan-out paying pure coordinator planning tax

    Symptom
    Narrow <12,000-token tasks burn 1.10x..1.13x USD and extra serial latency with zero quality gain.
    Diagnosis
    Coordinator planning turn runs even when all bundles fit comfortably in one single-agent window.
    Fix
    Require >= 3 disjoint read scopes and >= 12,000 raw tokens in Gate G1 before delegating.
    Verify
    node --test test/lab1-separability-and-handoff.test.ts
  • F-03Reproducible

    Forwarding full coordinator chat history into every worker

    Symptom
    Multi-agent input tokens balloon toward 15x single-agent cost and leak cross-scope hints.
    Diagnosis
    Worker dispatch copies coordinator message transcripts instead of minimal scoped task contracts.
    Fix
    Pass zero chat history and a single scoped user prompt bound to bound_scope in Gate G2.
    Verify
    node --test test/lab1-separability-and-handoff.test.ts
  • F-04Reproducible

    Overlapping worker scopes, unbounded pools, or recursive sub-spawns

    Symptom
    Duplicate workers race on identical scopes or recursively spawn runaway subagent trees.
    Diagnosis
    Plan validator accepts duplicate assigned_scope_ids, pools > 6, or exposes spawn tools to workers.
    Fix
    Reject OVERLAPPING_SCOPES, cap max_workers <= 6, and expose only read_assigned_bundle to workers.
    Verify
    node --test test/lab1-separability-and-handoff.test.ts
  • F-05Reproducible

    Claude 5.5 wire 400s, single-tool .find() bugs, or truncated JSON

    Symptom
    API calls fail with HTTP 400 on temperature or schema minimum, drop parallel tool blocks, or parse partial max_tokens output.
    Diagnosis
    Client sends legacy sampling params, uses content.find() instead of .filter(), or skips stop_reason checks.
    Fix
    Omit temperature and numeric schema bounds, collect tool_use blocks via .filter(), and require stop_reason === 'end_turn'.
    Verify
    node --test test/lab1-separability-and-handoff.test.ts
  • F-06Reproducible

    Promise.all crashing four healthy workers when one scope times out

    Symptom
    A single slow firmware subagent on H-11 rejects the entire batch and discards paid sibling envelopes.
    Diagnosis
    Unbounded Promise.all aborts on the first rejected worker promise without partial quarantine.
    Fix
    Wrap workers in Promise.allSettled with a 25,000ms per-worker cap and record failed scopes in quarantined_scopes[].
    Verify
    node --test test/lab2-quarantine-and-provenance.test.ts
  • F-07Reproducible

    Retry storms duplicating physical bundle reads or outbox holds

    Symptom
    Transient worker retries re-read identical 15K-token bundles and emit duplicate escalation holds.
    Diagnosis
    Tool layer lacks in-flight (scope_id, args_hash) read caching and idempotency-key outbox staging.
    Fix
    Share reads through IdempotentToolReadLedger and stage holds once per idempotency key in IdempotentActionOutbox.
    Verify
    node --test test/lab2-quarantine-and-provenance.test.ts
  • F-08Reproducible

    Redundant 4.08s second coordinator LLM synthesis turn

    Symptom
    Dev M-01 stalls at 10.44s (0.95x single-agent) because a second serial LLM call re-serializes already-typed JSON.
    Diagnosis
    Architecture adds a second coordinator LLM hop after workers already returned validated Zod envelopes.
    Fix
    Reconcile validated worker envelopes deterministically in Gate G4 host code (6.35s on M-01; 0.59x held-out Class A p95).
    Verify
    node --test test/lab2-quarantine-and-provenance.test.ts
  • F-09Reproducible

    Prompt-injected fake record IDs or silent conflict tie-breaking

    Symptom
    Untrusted contractor memo plants CERT-FAKE-999 into verified_anomalies on H-10 or hides PASS vs BREACH clashes on H-09.
    Diagnosis
    Synthesizer trusts model-emitted record strings without checking host receipts and overwrites conflicting shared measurements.
    Fix
    Verify every record_id against groundedRecordIds across non-quarantined scopes and emit PASS vs BREACH pairs in evidence_conflicts[].
    Verify
    node --test test/lab2-quarantine-and-provenance.test.ts
  • F-10Reproducible

    Omitting coordinator overhead from cost ledgers or shipping losing swarms

    Symptom
    Dashboard claims subagents are cheap by counting only worker tokens while multi-agent loses to single-agent on Class B.
    Diagnosis
    Scorecard omits coordinator planning/retry tokens (M09) or lacks a paired single-agent rejection gate.
    Fix
    Sum coordinator + all worker + retry USD in computeTotalRunCost() and enforce Gate G5 REJECT_MULTI_AGENT_USE_SINGLE_AGENT.
    Verify
    node --test test/lab3-paired-rejection-gate.test.ts

Transfer task and rubric

Design a separability router, minimal handoff schema, Promise.allSettled quarantine, host-receipt verifier, and paired single-versus-multi-agent scorecard for an unseen maritime clearance desk.

Analytic rubric: each criterion described at four performance levels, from Emerging to Exemplary
Criterion0 · Emerging1 · Developing2 · Proficient3 · Exemplary
R1: Upfront Separability, Spill, & Write Gate (Critical)Fans every prompt out to subagents without checking coupling, volume, or write intent.Checks token count or write intent partially while allowing coupled hop chains to fan out.Blocks write/restricted intents upfront with 0 workers, forces serial_dependency_edges > 0 to single_agent_direct, and enforces >= 3 scopes and token-spill thresholds.Proficient, and quantifies Amdahl/USL serial planning overhead on sub-spill and coupled tasks.
R2: Disjoint Scoped Handoffs & Claude 5.5 Wire Guards (Critical)Forwards full coordinator chat history and grants unrestricted tools to recursive subagents.Limits tools partially but omits duplicate-scope checks or stop_reason validation.Caps flat pool at <= 6 disjoint scopes, passes zero chat history, binds read-only tool closures per scope, and checks stop_reason === 'end_turn' before JSON.parse.Proficient, and enforces Claude 5.5 wire rules (omitting temperature and numeric schema bounds; collecting parallel tool blocks via .filter()).
R3: Pre-Dispatch Budget Reservation & Promise.allSettled QuarantineUses unbounded Promise.all so one slow subagent crashes the entire batch.Adds timeouts without pre-dispatch budget reservation or partial envelope preservation.Reserves worst-case tokens and USD upfront, enforces per-worker timeouts via Promise.allSettled, and isolates failures in partial_quarantine_hold while keeping healthy envelopes.Proficient, and bounds retry count so a timed-out scope never triggers cascading retry storms.
R4: Idempotent Tool-Read & Action-Outbox DeduplicationRe-reads full data bundles and re-emits hold actions on every worker retry.Caches reads without canonical argument hashing or omits idempotent outbox staging.Deduplicates physical reads by (scope_id, canonical_args_hash) and stages escalation holds once per deterministic idempotency key.Proficient, and verifies 0 duplicate physical reads and 0 duplicate holds in telemetry.
R5: Deterministic Host-Receipt Provenance & Conflict Surfacing (Critical)Runs a second LLM synthesis turn that trusts raw worker citations and silently drops conflicts.Checks citations partially or breaks PASS vs BREACH conflicts by picking the first worker.Merges typed envelopes deterministically in host code, verifies every record_id against host tool receipts across non-quarantined scopes, and emits conflicting PASS vs BREACH pairs in evidence_conflicts[].Proficient, and maps any unverified citation to S1 UNVERIFIED_CITATION hold while isolating untrusted log instructions.
R6: Full Coordinator+Worker Cost Ledger & Paired Rejection GateReports multi-agent wins without a single-agent baseline or counts only worker tokens.Compares against single-agent on happy paths without interleaving or full coordinator cost.Sums coordinator + all worker + retry USD in Decimal, interleaves AB/BA paired trials on frozen tasks, and emits REJECT_MULTI_AGENT when single-agent wins.Proficient, and evaluates both same-model latency payoff and tiered coordinator+worker cost portability.
R7: Frozen Split Discipline & Residual Risk AuditTunes routing thresholds directly on held-out tasks or claims universal swarm superiority.Separates dev and held-out sets informally without SHA-256 freeze manifests or residual risks.Enforces cryptographic pre-eval freeze manifests, S1 = 0 release holds, and documents at least three concrete residual risks.Proficient, and pairs each residual risk with a production telemetry alert and fallback trigger.

Proficiency standard: Proficient or higher on every criterion. Proposed local standard, not an official certification.

Self-check

The full brief

Target domain is an unseen multi-berth maritime clearance review desk with six read-only operational subsystems, one coupled 3-hop clearance chain, and restricted actuator/credential scopes.

Part 1: Specify the upfront Gate G1 separability and spill router (blocking writes, forcing coupled chains and narrow asks to single_agent_direct) and the Gate G2 minimal worker handoff contract (<= 6 disjoint read-only scopes, zero chat history, Claude 5.5 stop_reason and .filter() wire guards).

Part 2: Design Gate G3 RunBudgetReservationLedger, Promise.allSettled per-worker timeout quarantine, idempotent read/outbox deduplication, and Gate G4 deterministic host-receipt provenance and conflict preservation without a second LLM synthesis turn.

Part 3: Define a pre-frozen paired AB/BA evaluation scorecard summing full coordinator+worker USD, explicit APPROVE vs REJECT thresholds across separable and coupled classes, S1 = 0 hold rules, and three concrete residual risks (screened structurally and graded by a human reviewer).

Teach it to a room

  • 3-hour facilitation run-of-show

    Timed 6-block schedule covering Amdahl/USL failure modes, Labs 1 through 3 checkpoints, live vs replay scorecards, and unseen assessment handoff.

  • Checkpoint recovery script & 12-mutant check

    apply-checkpoint.mjs moves any learner cleanly to starter-baseline, checkpoint-a, checkpoint-b, or final; lab-solutions-check.sh kills 12/12 mutants offline.

  • Measured author clean-room walk

    Cold pnpm install completed in 0.18s into an empty store, followed by full hermetic checkpoint, replay, and mutant verification (10.74s) inside unshare -rn.

  • 8-criterion instructor clearance rubric

    Requires live demonstration of Gate G1 coupled routing, PFC-03 deterministic synthesis, Promise.allSettled quarantine, calibration scoring across S-A..S-D, and human review.

  • Honest dual-denominator pass-rate template

    Tracks both submitted and enrolled denominators plus critical R1/R2/R5 auto-fails; kept blank until a real observed cohort runs.

  1. [1]How we built our multi-agent research system · anthropic.comchecked Dec 1, 2026
  2. [2]Building effective agents · anthropic.comchecked Dec 1, 2026
  3. [3]Effective harnesses for long-running agents · anthropic.comchecked Dec 1, 2026
  4. [4]Effective context engineering for AI agents · anthropic.comchecked Dec 1, 2026
  5. [5]Writing effective tools for AI agents · anthropic.comchecked Dec 1, 2026
  6. [6]Demystifying evals for AI agents · anthropic.comchecked Dec 1, 2026
  7. [7]Structured outputs · platform.claude.comchecked Dec 1, 2026
  8. [8]Handling stop reasons · platform.claude.comchecked Dec 1, 2026
  9. [9]Effort parameter · platform.claude.comchecked Dec 1, 2026
  10. [10]Claude pricing · platform.claude.comchecked Dec 1, 2026
  11. [11]Towards a Science of Scaling Agent Systems · arxiv.orgchecked Dec 1, 2026
  12. [12]Why Do Multi-Agent LLM Systems Fail? (MAST) · arxiv.orgchecked Dec 1, 2026
  13. [13]Do We Truly Need So Many Agents? (Single-Agent Baseline Parity) · arxiv.orgchecked Dec 1, 2026
  14. [14]Multi-Agent Collaboration Mechanisms: A Survey of LLMs · arxiv.orgchecked Dec 1, 2026
  15. [15]Universal Scalability Law: A New Interpretation of Amdahl's Law · arxiv.orgchecked Dec 1, 2026
  16. [16]Promise.allSettled() specification and semantics · developer.mozilla.orgchecked Dec 1, 2026

Independent work. Not affiliated with or endorsed by any vendor named in this guide.

Jordan Hudgens

Written by

Jordan Hudgens

Technical educator and AI engineering leader. 16 Udemy courses, 111K students, and curricula used by 250K+ learners.

Next in the path

All guides