MCP
arXivarXiv
Preprint
Published: August 3, 2026
cs.SE

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

Abstract
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.
0
AI overview
Reviews
Citation graph
References · 56
Structured
This preview uses generator v1; v2 is available

Overview

Addressing the real-world software development scenario where users modify shared code while a coding agent is executing its task, this paper proposes the SWE-Touch evaluation framework to test coding agents' collaborative ability to respond to user code changes.

Scenario Background and Existing Gaps in Evaluating Coding Agents in Shared Workspaces

In real software development scenarios, the coding agent's operating environment is a shared workspace, where the user can view and modify code throughout the agent's task execution.

Existing repository-level coding agent evaluation benchmarks generally have limited scenario coverage: they typically evaluate only the agent's ability to complete tasks independently, or strictly restrict the user's channel of participation to message interaction. They lack evaluation components designed for the scenario of users directly modifying code in a shared workspace, and thus cannot verify the agent's ability to understand and respond to such code changes.

Interactive evaluation of agents already has substantial prior work, covering directions such as multi-turn dialogue with simulated users exhibiting diverse behavioral traits, and collaboration frameworks where both parties perform operations synchronously in a shared environment. In the coding domain, existing interactive evaluations have explored requirement clarification, selective help-seeking, iterative requirements, and corrective feedback, but the design of all such coding interaction evaluations passes the user's influence on the task entirely through message mediation and does not cover the interaction pattern of users directly modifying code.

Design Ideas and Construction Rules of the SWE-Touch Benchmark

SWE-Touch's core design is to inject synthetic user patches into the codebase a coding agent is working on during task execution. Each patch comes with a context message indicating that the change came from the user, and the agent must continue the original task from the post-injection code state. The construction of the whole interaction relies on three core components: task-critical code regions that anchor user edits to the repair task, validated task-conflicting patch artifacts, and deterministic injection delivery rules. You can combine the figure that follows to fully understand the benchmark's end-to-end implementation logic, from task identification to post-injection verification.

Fig. 1: Overview of the SWE-Touch method, showing the complete pipeline from task-critical region identification and conflicting edit construction/validation to shared-workspace injection evaluation.

For the conflicting-edit evaluation condition, the benchmark sets strict triple validation rules: the user edit alone cannot complete the target task, the task's reference patch can complete the target task independently, and applying the user edit together with the reference patch still leaves the task failing verification. These rules fundamentally rule out unreasonable cases where the user edit alone solves the task, or where simply concatenating it with the reference fix passes validation.

For the control-edit evaluation condition, the patch generation logic is exactly the reverse of conflicting edits: the generator derives small patches from the corresponding task's reference fix, and both share the same generation framework. The validation rule for control edits is correspondingly inverted: the generated patch must be a genuine step toward the correct fix, but when applied alone, at least one of the originally failing test cases must remain failing, ensuring the agent cannot complete the whole task merely by accepting the patch.

Multi-Model Evaluation Results, Failure Mechanism Analysis, and Research Boundaries

Under SWE-Touch's conflicting-edit condition, the 9 evaluated models' average problem resolution rate dropped by 7.7 percentage points compared with the original autonomous task setting, and all models showed negative changes; the performance drops across models ranged from 1.3 to 16.5 percentage points. This shows that robustness in shared workspaces is an evaluation dimension independent of autonomous resolution rate, not a direct derivative of autonomous task performance. You can combine the image that follows to intuitively understand the distribution and proportions of failure types across models.

Fig. 2: Solved-to-unresolved run failure analysis of 9 models on SWE-bench Verified, showing failure type distribution, each model's failure composition, and edit revision ratios.

Control ablations on 7 models show that when only trivial co-edit changes that do not affect task solvability are introduced, the average resolution rate drops by only 0.1 percentage points, with most models' performance fluctuation within ±1.2 percentage points and only a single model showing a 2.0 percentage-point drop, whereas the same group of models loses an average of 7.2 percentage points under the conflicting-edit condition. This significant difference indicates that the core challenge agents face comes not from interference or interruption by external code changes, but from scenarios where the changes conflict with the path to task completion.

This performance degradation also appears on the longer-horizon SWE-Bench Pro and DeepSWE evaluation sets; the most affected model differs across benchmarks, and most agents make additional tool calls in conflict scenarios, but these extra calls usually do not help the agents recover from the conflicted state.

The current evaluation uses a fixed-region-triggered intervention mechanism, ensuring reproducible and comparable evaluation conditions across models; this setting still differs from real full-duplex collaborative coding, where users dynamically observe the agent's output, code diffs, and test results, and autonomously decide whether to intervene, when, and how. Future research can extend toward adaptive user simulators to better approximate the interaction dynamics of real development.

Rating
No ratings yet
Rate
Community rating
—
/ 5
No ratings yet
Rating
—
Soundness
—
Presentation
—
Contribution
—
Confidence
—
Discussion
Top
Newest
Questions
Replication
Author
No comments yet — be the first