实时监控并修正编程代理的错误行为,提升修复代码缺陷的效率和成功率。
Online Monitoring and Corrective Steering of Programming Agents

- 通过规则化监控检测代理行为异常,仅在必要时调用大模型纠正
- 相比原始方法,修复成功率最高提升15.2%,平均提升9.9%
- 适合复杂、长周期的开源项目问题修复场景
在大规模项目中修复GitHub问题是一项长期任务,尤其当修复涉及多个位置或问题描述信息不足时。此时,智能体会经历长轨迹,易出现偏离计划、重复失败动作或无解终止等问题。本文提出LivePlan,实现对编程代理行为的实时监控、检测与纠正。LivePlan将判断与建议分离:采用确定性规则监控器分析轨迹中的通用信号以检测问题,仅在发现问题时才调用顾问大模型生成高层级修正指令。该设计避免了以往方法中因误导性重规划带来的高成本干预。我们在SWE-agent基础上实现LivePlan,使用五种LLM(三类执行代理,两类顾问)在SWE-bench Verified和SWE-bench Pro上进行评估。相比原版SWE-agent,LivePlan显著提升问题解决率,最高提升15.2%(平均9.9%),每实例仅增加0.08美元开销。新增解决方案主要集中于中等和困难级别问题。LivePlan在解决率上持续优于其他方法,对已成功案例影响极小,并解决了基线无法处理的新问题。
原文摘要 · Abstract (English)
Fixing GitHub issues in large-scale projects is a long-horizon task, especially when a fix requires changes across multiple locations or the issue description lacks the information needed to localize and repair it. As a result, agents traverse long trajectories that are prone to inefficiency and error: they drift away from their intended plan, repeat failed actions, or terminate without a working patch. This paper proposes LivePlan to monitor, detect, and correct such behavioral inefficiencies and drifts in real time. LivePlan decouples judging from advising: a deterministic, rule-based monitor examines general signals over the trajectory to detect issues without invoking an LLM, and only when an issue is detected does it consult an advisor LLM for a high-level, next-step correction. This design avoids the misleading re-planning and costly interventions of prior approaches. We implement LivePlan on top of SWE-agent and evaluate it using five LLMs (three as executor agents and two as advisors) across SWE-bench Verified and SWE-bench Pro. Compared to vanilla SWE-agent, LivePlan notably improves issue resolution rates, achieving consistent gains of up to 15.2% (average: 9.9%), while incurring only an additional cost of $0.08 per instance. The additional solutions concentrate on medium and hard instances. LivePlan consistently outperforms alternative approaches in resolution rate, with minimal regression on already successful runs and new successes on problems that no baseline solves.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。