递归调用完整代理舱,提升长文本推理与编码能力
Recursive Agent Harnesses

- 父代理生成脚本并行启动子代理舱,实现细粒度任务分解
- 在400万词上下文测试中,准确率从71.75%提升至89.77%
- 适合需要高阶自主调度的复杂任务系统设计者
递归语言模型(RLMs)表明,对模型调用的递归使用是长上下文推理的有效策略。当前生产级编码代理已开始大规模生成子代理,如Anthropic的动态工作流。本文提出并研究了这一模式:递归单元是具备文件系统工具、代码执行与规划能力的完整代理舱,而非无工具的模型调用。称之为递归代理舱(RAH),并将其视为模型递归的代码优先延伸。父代理生成可执行脚本,平行启动子代理舱处理细粒度任务,通过结构化函数调用处理小任务。在长上下文推理上进行受控评估:固定骨干模型为GPT-5以匹配现有Codex和RLM基线,RAH将编码代理基线准确率从71.75%提升至81.36%(Oolong-Synthetic,199样本,13个上下文长度桶,最大400万词)。该提升归因于代理舱设计而非模型本身;采用更强骨干模型Claude Sonnet 4.5时,准确率进一步达到89.77%。
原文摘要 · Abstract (English)
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%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。