SWE-Edit: Rethinking Code Editing for Efficient SWE-Agent
On the map: LLM reasoning → Reasoning for agents, planning and code
also in 1 more
Abstract (arXiv)
Large language model agents have made strong progress on software engineering, yet current systems suffer from a context coupling problem: the standard code editing interface conflates code inspection, modification planning, and edit execution within a single context window, forcing agents to interleave exploratory viewing with strictly formatted edit generation. Irrelevant context accumulates and edit reliability degrades. We propose SWE-Edit, which decomposes the editing interface into two specialized subagents: a Viewer that extracts task-relevant code on demand, and an Editor that executes modifications from high-level natural language plans -- letting the main agent focus on reasoning while delegating context-intensive operations to clean context windows. On SWE-Bench Verified, this decomposition raises resolve rate by 2.1 pp and cuts inference cost by 17.9%, with consistent gains across multiple reasoning-model families (Kimi-K2, MiniMax-M2.1, GLM-4.7). We further show that effective edit-format selection can be trained into a small model rather than requiring frontier-scale capacity: GRPO training on Qwen3-8B with an adaptive find-replace/whole-file-rewrite policy improves edit success by 12.5 pp and brings an 8B open-source editor to parity with GPT-5-nano on downstream SWE-Bench resolve rate. To enable rapid editor iteration, we release PR-Edit, a lightweight evaluation whose scores correlate strongly with SWE-Bench resolve rate. We release our code at https://github.com/microsoft/SWE-Edit.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 18 of its 34 references that are in the map. First posted on arXiv 28 Apr 2026.
Builds on
18 of 34 references.
Closest ancestors · 3
Same direction, newest first
- 2025BOAD: Discovering Hierarchical Software Engineering Agents via Bandit Optimization29 Dec
- 2024OpenAI o1 System Card21 Dec
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar
Other references · 15
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2025Qwen3 Technical Reportcited by 8,195
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 956
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2025Scaling Long-Horizon LLM Agent via Context-Foldingcited by 136
- 2025Live-SWE-agent: Can Software Engineering Agents Self-Evolve on the Fly?cited by 91
- 2025SWE-Fixer: Training Open-Source LLMs for Effective and Efficient GitHub Issue Resolutioncited by 87
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
3 more
Built on by
Citing papers per year: 2026: 3.
3 papers.
- 2026ChainSWE: Benchmarking Coding Agents on Multi-Bug Software Maintenancecited by 2
- 2026The Working Set of a Coding Agent: Coherence Debt in Repository-Scale Taskscited by 1
- 2026Diffs vs. Whole Files: An Empirical Comparison of Iterative Edit-Based and Direct Generation for Flutter/Dart Code Modelscited by 0
- 2026Diffs vs. Whole Files: An Empirical Comparison of Iterative Edit-Based and Direct Generation for Flutter/Dart Code Models5 Sep 2026
- 2026The Working Set of a Coding Agent: Coherence Debt in Repository-Scale Tasks17 Aug 2026
- 2026ChainSWE: Benchmarking Coding Agents on Multi-Bug Software Maintenance1 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2026SAFEdit: Does Multi-Agent Decomposition Resolve the Reliability Challenges of Instructed Code Editing?
- 2026CRANE: Constrained Reasoning Injection for Code Agents via Nullspace Editing
- 2026SWE Context Bench: A Benchmark for Context Learning in Coding
- 2026SWE-Touch: Benchmarking Coding Agents When Users Touch the Code
- 2026SWE-World: Building Software Engineering Agents in Docker-Free Environments
- 2026From SWE-ZERO to SWE-HERO: Execution-free to Execution-based Fine-tuning for Software Engineering Agents
- 2026Agent-Editing World Model: Rethinking World Modeling for LLM Agents
- 2026From Completion to Editing: Unlocking Context-Aware Code Infilling via Search-and-Replace Instruction Tuning