Switch-SWE:编码智能体在切换未完成任务时能否保持专注?
Switch-SWE: Do Coding Agents Hold Focus When Switching Between Unfinished Tasks?
AI总结:
本研究提出Switch-SWE基准,发现编码智能体切换同一仓库的未完成任务时,专注任务解决率平均下降11.5个百分点,引入的上下文管理模块可将完成率提升5.5至15.5个百分点。
摘要:
软件开发会话通常涉及多个未完成任务,而非单一问题的完整处理。随着编码智能体承担仓库级开发任务,它们需要在介入其他工作后恢复早期任务的需求与部分进展。现有仓库级基准通常仅对“单一问题生成补丁”的场景评分,未直接衡量智能体在同一仓库中推进其他未完成工作后能否恢复原任务。我们提出\textbf{\theirmethod}(Switch-SWE),这是一个针对“专注任务恢复”的基准,适用于同一源仓库中未完成任务交错的会话,每个任务都有持久的检出版本。每个专注任务在匹配的“未中断会话”与“切换会话”中接受评估,两者具有相同的专注需求与可执行验证器;切换会话会交错同一仓库中其他未完成任务的有序阶段,仅对最终的专注补丁评分。\theirmethod包含来自19个Python仓库的200个专注任务,这些任务从问题、拉取请求与评审历史中重构为400个匹配的会话规范。在7个编码智能体上的实验显示,交错的未完成工作会导致平均专注任务解决差距达11.5个百分点,范围为6.0至15.0个百分点。轨迹分析发现,跨任务需求混淆与任务状态丢失是常见的恢复问题。我们引入了一个插件式上下文管理模块,该模块会选择与任务相关的历史并维护简洁的任务状态摘要;在OpenCode上,该模块使评估模型在同一仓库任务切换下的专注任务完成率提升了5.5至15.5个百分点。代码可在该http URL获取。
英文摘要:
Software development sessions often involve several unfinished tasks rather than one issue carried through to completion. As coding agents take on repository-level development, they need to recover an earlier task's requirements and partial progress after intervening work. Existing repository-level benchmarks typically score one issue-to-patch episode and do not directly measure whether an agent can resume a task after advancing other unfinished work in the same repository. We introduce \textbf{\ourmethod}, a benchmark for focus-task resumption in sessions that interleave unfinished tasks drawn from the same source repository, with a persistent checkout for each task. Each focus task is evaluated in matched uninterrupted and switched sessions with identical focus requirements and executable verifiers. The switched session interleaves ordered stages from other unfinished tasks in the same repository, while only the final focus patch is scored. \ourmethod~contains 200 focus tasks from 19 Python repositories, reconstructed from issue, pull-request, and review histories and rendered as 400 matched session specifications. Across 7 coding agents, interleaved unfinished work produces an average focus-task resolution gap of 11.5 percentage points, ranging from 6.0 to 15.0 percentage points. Trajectory analysis identifies cross-task requirement confusion and loss of task state as recurrent resumption behaviors. We introduce a plug-in context-management module that selects task-relevant history and maintains concise task-state summaries. On OpenCode, the module improves focus-task completion under same-repository task switching by 5.5 to 15.5 percentage points across the evaluated models. Code is available at github.com/Miraclecsc/Switch-SWE.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。