How do you read a 536K-token document?
Imagine a 536K-token document containing 1,772 key-value pairs. Your task: extract every entry and answer questions about them.
- A coding agent writes a regex script and loops through entries. Fast—but regex only captures surface patterns and fails on entries that require reasoning.
- A recursive language model (RLM) chunks the document and reasons over each piece. It can reason—but it can't see a file system or use tools.
- What if you spawned a clone for each entry, each with a full toolbox, file system, and reasoning ability? That is the core idea of the Recursive Agent Harness (RAH).
- Harness: everything that turns an LLM into a working agent—tools, file system, context engineering, orchestration logic. Like a car wiring harness connecting the engine, steering, and dashboard into a drivable vehicle.
- Recursive: the harness can produce harnesses. A parent agent writes code that launches a complete sub-agent harness for each subtask.
- Key difference: RLM's recursion unit is a *model call* (no tools); RAH's recursion unit is a *full harness* (tools, file system, reasoning).
- Code-Execution Spawning: for large numbers of items, the parent writes an executable script that launches a sub-agent per item via a
Task()function, running them in parallel—like a factory line with one dispatcher writing instructions. - JSON Tool-Call Spawning: for only 1–5 items, launch sub-agents directly through structured function calls—like a boss verbally assigning a few tasks.
What is a "recursive agent harness"?
Breaking down the name:
Analogy: RLM is one person breaking a big task into pieces and doing them alone; RAH is a manager delegating to a team of interns, each with a full desk and toolbox.
Two spawning modes
Results: the harness wins
Tested on Oolong-Synthetic (199 samples, 13 context-length buckets from 1K to 4M tokens), with GPT-5 fixed as backbone for fair comparison:
| Method | Accuracy | |--------|----------| | Codex (coding agent, regex) | 71.75% | | RLM (recursive LM, no tools) | 64.38% | | RAH (recursive agent harness) | 81.36% |
With Claude Sonnet 4.5 as backbone, RAH reaches 89.77%.
Key findings:
1. Gains come from the harness, not the model: same GPT-5, from 71.75% to 81.36%, purely via architecture. 2. Consistent improvement across all length buckets, including 4M-token documents. 3. Coding agents bottleneck on reasoning: regex is fast but not smart. 4. RLMs bottleneck on tools: they can reason but can't see files—like doing math blindfolded.
Why it matters
RAH exposes an overlooked design dimension: the choice of the recursion unit. Upgrading it from a bare model call to a full harness gives you both reasoning and tool access—the half that coding agents and RLMs each lack. Moreover, RAH's spawning logic is ordinary program code, not a fixed recursion convention or predefined tool schema, letting the parent parameterize concurrency, per-item instructions, and output paths in the same language it writes code in. Anthropic's dynamic workflows already use a similar code-driven spawning pattern in production; RAH is the first systematic naming, definition, and evaluation of it.
Honest assessment
RAH is not a silver bullet. It costs more compute and latency—launching a full sub-agent per item is not cheap. The authors acknowledge failure modes: when items have dependencies, parallel spawning can miss cross-item reasoning chains. RAH has only been validated on Oolong-Synthetic, a highly structured (key-value) benchmark; performance on more open-ended long-context tasks remains untested.
Still, the core insight is clear: in agent architectures, the choice of recursion unit matters as much as the choice of model. The same backbone, with a different recursion strategy, gains nearly 10 percentage points—a signal worth attention for anyone building agent systems.
---
Paper: Recursive Agent Harnesses Authors: Elias Lumer, Sahil Sen, Kevin Paul, Vamse Kumar Subbiah (PwC US) Field: Multi-Agent Systems, Long-Context Reasoning