编码代理不知何时行动
Coding Agents Don't Know When to Act
AI总结:
研究发现当前编码代理在处理过时bug报告时频繁错误修改代码,提出需显式引导无行动以避免技术债务。
摘要:
编码代理越来越多地被用于自主维护软件,包括解决用户报告的问题:一个bug报告到来后,代理会创建补丁来解决。然而,在任何真实部署中,它们都会遇到过时的bug报告,涉及已解决的问题。代理应识别这种情况并避免修改代码以避免积累技术债务。为了系统评估当前代理是否如此,我们引入了FixedBench,一个包含200个人验证的编码任务的代码基准,其中不需要代码更改,测试了五个最近模型在四个代理框架下的表现。我们发现,即使是最先进的模型也失败,提出了不 desirable 的更改(排除测试和文档)在35%到65%的情况下。明确指示在修补前重现问题部分缓解了这个问题,但引入了新的失败模式:当问题部分修复时,它们即使需要补丁也选择不行动。更广泛地说,我们的结果表明,LLMs受到一种行动偏差的影响:即使不行动是合适的,它们仍选择行动。为了打破这种模式,无行动需要被显式地框架为成功路径,这突显了当前训练目标中隐含的过度依赖于人类指导。
英文摘要:
Coding agents are increasingly deployed to autonomously maintain software, including to resolve user-reported issues: a bug report comes in and the agent creates a patch to address it. However, in any real-world deployment, they will encounter stale bug reports about issues that have already been resolved. Agents should recognize this and abstain from modifying the code to avoid accumulating technical debt. To systematically evaluate whether current agents do so, we introduce FixedBench, a code benchmark with 200 human-verified coding tasks in which no code changes are required, testing five recent models across four agent harnesses. We find that even state-of-the-art models fail, proposing undesirable changes (excluding tests and documentation) in $35$ to $65\%$ of cases. Explicit instructions to reproduce the issue before patching partially address this issue but introduce a new failure mode: when an issue is partially fixed, they abstain even though a patch would still be needed. More broadly, our results indicate that LLMs fall prey to an action bias: they choose to act even if inaction would be appropriate. To break this pattern, inaction needs to be explicitly framed as a path to success, which highlights an overreliance on human guidance implicit in current training objectives.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。