NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

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

Yuqiao Tan, Jinxiang Meng, Fangyu Lei, Minzheng Wang, Shizhu He, Jun Zhao, Kang LiuarXiv 2026

TL;DR

While AI coding agents excel at solving software bugs autonomously, real-world development happens in shared workspaces where human users constantly modify code. SWE-Touch is a new benchmarking framework that stress-tests coding agents by injecting task-conflicting "Counter-Edits" into the repository while the agent is working. The evaluation reveals a significant gap: even top-tier models frequently fail when a user introduces conflicting code, often blindly deferring to the user or failing to properly validate the final codebase.

What Problem Does This Paper Address?

Existing repository-level benchmarks (like SWE-bench) treat AI coding agents as solitary developers working on a static codebase. If user interaction is included at all, it is strictly limited to text messages. However, real-world software engineering is highly collaborative and dynamic.

An analysis of real-world developer-agent interactions in the SWE-chat dataset reveals that 59.0% of sessions contain repository changes directly attributed to the human user.

Figure 1: Users and agents share a workspace in real coding sessions. (a) A user edit alters the repository state that subsequent agent actions observe and modify. (b) Our analysis of the released SWE-chat data [5] finds that 59.0% of sessions contain repository changes attributed to the user.

When a user modifies code in a shared workspace, the agent must observe, understand, and reconcile these changes with the overall task. SWE-Touch addresses this evaluation gap by asking a fundamental question: How do coding agents respond when a user touches the code?

Methods

SWE-Touch introduces a controlled, reproducible pipeline to simulate a "miscalibrated" but well-meaning user who introduces a plausible but incorrect code change (a Counter-Edit) during an active coding session.

The framework operates in four main stages:

  1. Mining Task-Critical Regions: The framework runs multiple distinct frontier models (GPT-5.5, GLM-5.1, MiniMax M2.7) on a task to identify the exact code regions most frequently read or edited during successful or attempted repairs.
  2. User Edit Construction: A separate User Patch Generator agent takes the task description and the critical regions to craft a small, locally plausible "Counter-Edit" that introduces a subtle mistake into the data flow.
  3. Validation: To ensure the benchmark is fair and rigorous, each candidate edit is programmatically validated. The edit must not accidentally solve the task, and it must actively cause the final reference solution to fail if blindly combined.
  4. Shared Workspace Evaluation: During the evaluation run, when the testing agent attempts to access or modify the critical code region, the framework dynamically injects the Counter-Edit into the repository alongside a contextual natural language message from a simulated user.
Figure 2: Overview of SWE-Touch. Agent trajectories identify task-critical regions; a separate generator constructs and validates task-conflicting edits; evaluation injects each edit and its contextual message into the shared workspace before task verification.

Datasets

The authors evaluated nine state-of-the-art LLMs using:

  • A seeded random sample of 200 tasks from SWE-bench Verified (the primary evaluation set).
  • 25 longer-horizon tasks from SWE-Bench Pro.
  • 25 longer-horizon tasks from DeepSWE.

Key Insights and Ideas

  • Autonomous Performance $\neq$ Collaborative Robustness: A model's standalone success rate on static benchmarks does not guarantee it can handle a dynamic workspace. When forced to collaborate, models with identical vanilla scores showed wildly different levels of degradation and rank instability.
  • The Deference Trap: Trajectory analysis showed that the single largest failure mode (63.3% of failed runs) was retained conflict. Agents frequently chose to defer to the user's incorrect code rather than challenge it, treating the user's implementation as an absolute truth.
  • Inadequate Verification: Even when models actively opposed the user's edit and attempted to overwrite it (a behavior highly correlated with better performance), they often replaced it with an incorrect fix or failed to run targeted unit tests to verify the new behavior.

Key Results

  • Performance Drop: Injecting Counter-Edits caused an average drop of 7.7 percentage points in resolve rate across all nine models on SWE-bench Verified.
  • Model Heterogeneity: The performance impact varied drastically by model. Claude Opus 4.8 and GPT 5.5 proved the most robust, losing only 1.8 and 1.3 points respectively. In contrast, open-source models like Qwen3-Coder-480B suffered massive drops of up to 16.5 points.
  • Semantic Conflict is the Culprit: As a control, the authors ran a "Co-Edit" experiment using helpful, task-aligned user edits. This caused virtually no performance degradation (-0.1% average change), proving that models are disrupted by the semantic conflict of the user's code, not just the physical interruption of the workspace changing.

Limitations and Future Work

While SWE-Touch provides a solid foundation for interactive benchmarking, it has a few limitations:

  • Controlled Extremes: The benchmark specifically focuses on task-conflicting edits to isolate model vulnerabilities. It does not yet capture the full, messy distribution of human behavior, which includes partially correct fixes or shifting requirements.
  • Lack of Full-Duplex Interaction: The simulated user injects code based on pre-calculated triggers rather than dynamically reacting to the agent's live actions in a continuous, back-and-forth loop.

The authors suggest that future work should focus on training "collaboration-aware" agents that excel at detecting external workspace changes, inferring user intent, and rigorously re-validating codebases before proceeding.

Summary updated

BibTeX
@misc{tan2026swe,
  author = {Yuqiao Tan and Jinxiang Meng and Fangyu Lei and Minzheng Wang and Shizhu He and Jun Zhao and Kang Liu},
  title = {{SWE-Touch: Benchmarking Coding Agents When Users Touch the Code}},
  year = {2026},
  eprint = {2608.02499},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.02499},
}
Figure