AI 编程 4.0 · 优秀 2026-11-25 · 论文

When Are Parallel Subagents Effective for Coding? An Empirical Study on Repository Construction

在 NL2Repo 与 ProgramBench 仓库构建任务上以同等时间与成本对比单 agent 与并行 subagent:后者仅把隐藏测试通过率提升约 1-5 个百分点,成本最高 3.8 倍收益集中在难任务,可归因三个机制:自我检查(一句'先探测参考程序'即可拿回大部分收益,GPT-6.1 单 agent 自检更足后差距缩小)全新上下文(定期开新会话推进更快)与模块化(更多文件更短函数)仅当单 agent 过早停止自检长会话低效编辑或任务需要模块化时 subagent 才值得

打开原文回到归档

When Are Parallel Subagents Effective for Coding? An Empirical Study on Repository Construction

  • ID: 659bc4ae
  • 原文链接: https://arxiv.org/abs/2611.33893
  • PDF: https://arxiv.org/pdf/2611.33893
  • 作者: Zhiheng Lyu, Chengyu Yin, Lingming Zhang
  • 日期: 2026-11-25
  • 更新: 2026-11-25
  • 分类: coding
  • 来源类型: paper
  • 标签: coding-agents, multi-agent, delegation, empirical-study
  • 质量评分: 4/5
  • 抓取时间: 2026-11-29T04:20:30Z

中文导读

在 NL2Repo 与 ProgramBench 仓库构建任务上以同等时间与成本对比单 agent 与并行 subagent:后者仅把隐藏测试通过率提升约 1-5 个百分点,成本最高 3.8 倍收益集中在难任务,可归因三个机制:自我检查(一句'先探测参考程序'即可拿回大部分收益,GPT-6.1 单 agent 自检更足后差距缩小)全新上下文(定期开新会话推进更快)与模块化(更多文件更短函数)仅当单 agent 过早停止自检长会话低效编辑或任务需要模块化时 subagent 才值得

为什么值得关注

Parallel coding subagents cost up to 3.8x for 1-5pp gains; self-checking, fresh context and modularity explain when they help.

值得关注的原因在于它把「多 agent 是否值得」从直觉变成可测问题:同等时间与成本下并行 subagent 仅带来约 1-5 个百分点的隐藏测试通过率提升,成本最高 3.8 倍,而自检提示、定期新会话、模块化三个机制给出了可操作的判断条件;论文附代码与数据集,结论可直接复核。

关键信息

  • 论文标题: When Are Parallel Subagents Effective for Coding? An Empirical Study on Repository Construction
  • 作者: Zhiheng Lyu, Chengyu Yin, Lingming Zhang
  • arXiv: https://arxiv.org/abs/2611.33893
  • PDF: https://arxiv.org/pdf/2611.33893
  • 发布时间: 2026-11-25
  • arXiv 分类: cs.MA, cs.AI
  • 关联标签: coding-agents, multi-agent, delegation, empirical-study

English Abstract

LLM-based coding agents are increasingly used for long-horizon tasks such as building an entire program from a specification. Products like Codex and Claude Code let an agent delegate work to parallel subagents, multiplying run cost, yet it remains unclear whether and when delegation produces a better program. We compare a single agent with a main agent delegating to subagents on repository-construction tasks from NL2Repo and ProgramBench (which also provides an executable reference program). We compare scores at equal time and equal cost, run intervention experiments, and analyze fine-grained behavior. On randomly drawn tasks, parallel subagents raise hidden-test pass rates by only about 1 to 5 percentage points at up to 3.8x the cost of a single agent. Their gain is larger on hard tasks, where we find evidence of three mechanisms. Self-checking: with GPT-5.6 Sol, one sentence telling a single agent to probe the reference program first recovers most of this gain at a fraction of the cost; from GPT-5.6 Sol to GPT-6.1 Sol, the gain shrinks as single agents check their own work more. Fresh context: in extended runs, a single agent that periodically starts a new session with an empty conversation makes faster early progress in every comparison than one that resumes its conversation. Modularity: multi-agent runs produce more modular code (more files and shorter functions), closer to the upstream source. We observe similar patterns in a smaller replication with Opus 5.5 on Claude Code. Overall, subagents help when (i) a single agent stops checking too early, (ii) a long session keeps editing with little improvement, or (iii) modular code helps on the task; otherwise, they mainly add cost.

English Summary

Compares a single LLM coding agent with a main agent delegating to parallel subagents on repository-construction tasks from NL2Repo and ProgramBench at equal time/cost. Parallel subagents raise hidden-test pass rates by only 1-5 percentage points at up to 3.8x the cost, with gains concentrated on hard tasks. Three mechanisms: self-checking (one sentence telling a single agent to probe the reference program recovers most of the gain, and GPT-6.1 agents shrink the gap by self-checking more), fresh context (periodically restarting with an empty conversation makes faster early progress than resuming), and modularity (multi-agent runs produce more files and shorter functions). An Opus 5.5 on Claude Code replication shows similar patterns. Subagents help when a single agent stops checking too early, a long session stalls, or modular code matters; otherwise they mainly add cost.

Obsidian Notes

  • 内容获取路径:本次运行 opencli arxiv paper <arxiv_id> -f json 一次成功,页面由 arXiv 元数据与摘要回填。
  • 中文导读与价值判断均锚定在条目已有摘要、论文摘要、作者、日期与分类信息上;未添加论文摘要之外的实验细节。
  • 现代站点生成器按 content/{entry.id}.md 查找内容页;本文件写入 canonical content 目录,而不是 openclaw/content/。