Stage 3 · Subagent Map-Reduce Context Isolation & Anti-Rot Pattern
Stage 3 orchestration pattern preventing Context Rot in long-horizon tasks by dispatching isolated, clean-context worker Subagents over bounded slices and returning strictly typed condensed findings back to the coordinator.
Best For
Repository-wide code audits, multi-document diligence reviews, and Deep Research agents scanning dozens of noisy artifacts.
Human-AI Boundary
Enforce hard spawn-depth caps (<=2) and global spend breakers; worker outputs undergo schema verification before coordinator state merge.
Anti-Patterns to Avoid
- Passing full parent conversation history (100k tokens) plus raw web HTML dumps into every worker step sequentially
- Allowing unbounded recursive Subagent spawning without max depth = 1–2 and global token budget limits
Latency/Cost Profile & Eval Metrics
Parallel fan-out cuts wall-clock duration by Nx worker count · Sum of isolated narrow worker contexts << single bloated quadratic-cost history
- Context Overhead Compression Ratio: Worker return summary <= 15% of raw retrieved input tokens with >= 95% key-fact recall (Enforce strict Pydantic artifact schema on Subagent handoff payloads)
💰 Business ROI Model & Evidence Level
production_practiceIsolating noisy file/web reads inside disposable workers cuts cumulative input token consumption by 60–75% while raising needle-in-haystack synthesis accuracy.
🏗️ End-to-End Architecture Pipeline
Coordinator splits target scope into disjoint shards; each worker starts with a clean system prompt and scoped read tools.
Workers emit compact structured findings with explicit evidence pointers; coordinator deduplicates and synthesizes the final response.
⚖️ Engineering Trade-Off & Decision Matrix
🚨 Production Failure Modes & Signatures
- Subagents hallucinating missing global constraints when the coordinator writes vague underspecified shard briefs
- Parallel worker fan-out overwhelming downstream database or API rate limits without concurrency semaphores
Bidirectional Taxonomy Links
Internal Tools & Primary Sources
- Anthropic — Building Effective Agents (Orchestrator-Workers & Subagent Isolation) (engineering_blog, 2026-11-17)