RAH 解决了长上下文推理中智能体扩展性的核心瓶颈,做复杂编码任务或智能体系统的开发者可以直接参考其设计思路,效果提升显著。
本文提出 Recursive Agent Harness (RAH) 概念,将递归从模型调用扩展到完整智能体框架,包含文件系统、代码执行和规划能力。在长上下文推理任务上,RAH 在 GPT-5 骨干上比 Codex 基线提升近 10 个百分点(71.75% → 81.36%),使用 Claude Sonnet 4.5 时达到 89.77%。该方法通过父智能体生成可执行脚本并行启动子智能体,结合结构化函数调用处理细粒度任务,为生产级编码智能体提供了新范式。
Recursive Agent Harnesses
Recursive language models (RLMs) showed that recursion over model calls is an effective strategy for long-context reasoning, and production coding agents have begun to write code that spawns subagents at scale, most recently in Anthropic's dynamic workflows. We name and study the pattern between these two lines of work, where the recursive unit is a full agent harness with filesystem tools, code execution, and planning rather than a model call with no tools. We call this the Recursive Agent Harness (RAH) and frame it as harness recursion, the code-first extension to the model recursion of RLMs. A parent agent generates and runs an executable script that spawns subagent harnesses in parallel for fine-grained workloads and uses structured function calls for small subtasks. We provide a controlled evaluation on long-context reasoning. With the backbone held fixed at GPT-5 to match the published Codex and RLM baselines, RAH improves the Codex coding-agent baseline from 71.75% to 81.36% on Oolong-Synthetic (199 samples, 13 context-length buckets up to 4M tokens), a gain attributable to the harness rather than the model. With a stronger backbone, Claude Sonnet 4.5, the same design reaches 89.77%.