SAFEdit: Does Multi-Agent Decomposition Resolve the Reliability Challenges of Instructed Code Editing?
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Instructed code editing is a significant challenge for large language models (LLMs). On the EditBench benchmark, 39 of 40 evaluated models obtain a task success rate (TSR) below 60 percent, highlighting a gap between general code generation and the ability to perform instruction-driven editing under executable test constraints. To address this, we propose SAFEdit, a multi-agent framework for instructed code editing that decomposes the editing process into specialized roles to improve reliability and reduce unintended code changes. A Planner Agent produces an explicit, visibility-aware edit plan, an Editor Agent applies minimal, literal code modifications, and a Verifier Agent executes real test runs. When tests fail, SAFEdit uses a Failure Abstraction Layer (FAL) to transform raw test logs into structured diagnostic feedback, which is fed back to the Editor to support iterative refinement. We compare SAFEdit against both prior single-model results reported for EditBench and an implemented ReAct single-agent baseline under the same evaluation conditions. We used EditBench to evaluate SAFEdit on 445 code editing instances in five languages (English, Polish, Spanish, Chinese, and Russian) under varying spatial context variants. SAFEdit achieved 68.6 percent TSR, outperforming the single-model baseline by 3.8 percentage points and the ReAct single-agent baseline by 8.6 percentage points. The iterative refinement loop was found to contribute 17.4 percentage points to SAFEdit's overall success rate. SAFEdit's automated error analysis further indicates a reduction in instruction-level hallucinations compared to single-agent approaches, providing an additional framework component for interpreting failures beyond pass or fail outcomes.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 9 of its 15 references that are in the map. First posted on arXiv 28 Apr 2026.
Builds on
9 of 15 references.
References · 9
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2024CodeR: Issue Resolving with Multi-Agent and Task Graphscited by 91
- 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 48
- 2024LeDex: Training LLMs to Better Self-Debug and Explain Codecited by 40
- 2025Learning to Generate Unit Tests for Automated Debuggingcited by 17
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Modelscited by 7
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026SWE-Edit: Rethinking Code Editing for Efficient SWE-Agent
- 2026ExecuGraph: A Multi-Agent, Execution-Grounded Framework for Reliable Backend Code Synthesis with Large Language Models
- 2026Coherence Collapse: Diagnosing Why Code Agents Fail After Reaching the Right Code
- 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring
- 2025RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Code
- 2026REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring
- 2026TDD-Agent: Test-Driven Reasoning for Code Generation
- 2026When Models Edit Too Much: On the Fidelity of Minimal Code Edits