SWE-Touch:当用户改动代码时,编码代理的基准测试

SWE-Touch: Benchmarking Coding Agents When Users Touch the Code

精选理由

编码代理平时跑分很强,但用户中途改代码就露馅。SWE-Touch实测9个模型,成功率平均掉7.7个百分点,原因挺有意思。

AI 摘要

SWE-Touch是一个新基准,通过注入与任务冲突的代码改动来测试编码代理在共享工作区中的适应能力。在SWE-bench Verified上,Counter-Edit使九个编码模型的平均解决率下降7.7个百分点。在SWE-Bench Pro和DeepSWE等更长周期任务上,退化依然存在。轨迹分析显示,代理可能保留冲突代码,或在没有重新检查仓库和运行定向测试的情况下直接替换。

原文 · arXiv cs.AI

SWE-Touch: Benchmarking Coding Agents When Users Touch the Code

Real-world software development requires coding agents to operate in shared workspaces where users may inspect and modify code during an ongoing task, yet existing repository-level benchmarks typically evaluate agents working alone or restrict user participation to messages. This leads us to ask: how do coding agents understand and respond to code changes in a shared workspace? We introduce SWE-Touch, a framework that stress-tests this setting through validated Counter-Edits: plausible edits to task-relevant code that conflict with task completion. SWE-Touch mines task-critical regions from multiple repair trajectories, uses a separate User Patch Generator to construct the edits, and injects them with contextual user messages when agents reach the relevant code. We evaluate nine coding models on SWE-bench Verified, with additional experiments on longer-horizon tasks from SWE-Bench Pro and DeepSWE. Counter-Edit lowers average resolve rate by 7.7 percentage points on SWE-bench Verified, with degradation also persisting on both longer-horizon benchmarks. Trajectory analysis links these failures to limited awareness of the evolving workspace: agents may retain conflicting code or replace it without sufficiently re-inspecting the repository and validating the revised code with targeted tests. These findings show that strong autonomous performance does not yet ensure the state awareness and adaptive behavior needed for shared-workspace collaboration, and point to detecting workspace changes, reconciling conflicting edits with the task, and verifying the affected behavior as key capabilities for future optimization.