# Fixed or Deleted? External Feedback Lets Cheaper AI Coding Agents Repair Rule Violations

arXiv: https://arxiv.org/abs/2611.29162 · HTML: https://mlsanity.com/paper/2611.29162/

## Key facts

- No citing papers in the map yet (data through 26 Nov 2026).
- Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use.
- Builds on 20 of its 29 references that are in the map.
- Submitted 22 Nov 2026, announced 24 Nov 2026.

## Placed in

- LLM agents and tool use / [Software engineering coding agents](https://mlsanity.com/agents/software-engineering-coding-agents/)

## Builds on (most cited first, 20 of 20)

- [Reflexion: Language Agents with Verbal Reinforcement Learning](https://mlsanity.com/paper/2303.11366/) (2023)
- [SWE-bench: Can Language Models Resolve Real-World GitHub Issues?](https://mlsanity.com/paper/2310.06770/) (2023)
- [Self-Refine: Iterative Refinement with Self-Feedback](https://mlsanity.com/paper/2303.17651/) (2023)
- [SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering](https://mlsanity.com/paper/2405.15793/) (2024)
- [Large Language Models Cannot Self-Correct Reasoning Yet](https://mlsanity.com/paper/2310.01798/) (2023)
- [Agentless: Demystifying LLM-based Software Engineering Agents](https://mlsanity.com/paper/2407.01489/) (2024)
- [Is Self-Repair a Silver Bullet for Code Generation?](https://mlsanity.com/paper/2306.09896/) (2023)
- [ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Cases](https://mlsanity.com/paper/2510.20270/) (2025)
- [EvilGenie: A Reward Hacking Benchmark](https://mlsanity.com/paper/2511.21654/) (2025)
- [Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?](https://mlsanity.com/paper/2602.11988/) (2026)
- [Static Analysis as a Feedback Loop: Enhancing LLM-Generated Code Beyond Correctness](https://mlsanity.com/paper/2508.14419/) (2025)
- [Efficiently Distilling LLMs for Edge Applications](https://mlsanity.com/paper/2404.01353/) (2024)
- [CodeCureAgent: Automatic Classification and Repair of Static Analysis Warnings](https://mlsanity.com/paper/2509.11787/) (2025)
- [Flexible and Effective Mixing of Large Language Models into a Mixture of Domain Experts](https://mlsanity.com/paper/2408.17280/) (2024)
- [Evaluating Large Language Models for Detecting Architectural Decision Violations](https://mlsanity.com/paper/2602.07609/) (2026)
- [Declarative Skills for AI Agents in Knowledge-Grounded Tool-Use Workflows](https://mlsanity.com/paper/2606.06923/) (2026)
- [Collaboratively adding new knowledge to an LLM](https://mlsanity.com/paper/2410.14753/) (2024)
- [Exploration Structure in LLM Agents for Multi-File Change Localization](https://mlsanity.com/paper/2606.11976/) (2026)
- [Neural-Progressive Hedging: Enforcing Constraints in Reinforcement Learning with Stochastic Programming](https://mlsanity.com/paper/2202.13436/) (2022)
- [Quantum-Inspired Trace-Augmented Evidence Selection for Reasoning over Structured Hypothesis Spaces](https://mlsanity.com/paper/2606.06941/) (2026)

## Abstract (arXiv)

Many defects violate project rules that the code itself does not reveal, such as layering constraints or required tests. We study whether LLM coding agents repair such violations better when an external checker reports them, with their location and a repair goal. Three models, a small, medium and large model, driven by an AI agent, worked on 25 pull requests with 31 planted defects in ten open-source projects, plus 5 correct controls, five times alone and five times with findings from CodeAssure (CA), a commercial checker. We also compare with GitHub Copilot code review, and compare CodeAssure's detection with nine free static-analysis tools run out of the box, including Semgrep and SonarQube Community. Counting a run as repaired only when the repaired code also compiles and keeps its feature, CA findings raised the repair rate from 26% to 69% for the smallest model, from 46% to 90% for the medium model and from 45% to 93% for the largest model (pull-request-level p < 0.001), and from 39% to 84% over all runs. Every Java, TypeScript and Python repair compiled. We found that agents often cleared a defect by deleting a newly added file. Metrics based on whether the defect is gone count feature deletion as a success. The largest model alone did so in 44 of 125 runs. CA includes a check for deleted files that largely prevents this. In an ablation with the check turned off, removals rose from 9 to 65 out of 375 runs and the repair rate fell to 54% (small), 70% (medium) and 85% (large model). The CA workflow also outperformed Copilot code review (p < 0.001). Together, the free tools detected 8 of the 31 defects, and CA detected all 31. With CA, the medium model repaired 90% of runs, against 45% for the largest model alone, at about one fifth of the mean cost per run (0.17 against 0.91).
