mlsanityData to 7 Oct 2026

RepairAgent: An Autonomous, LLM-Based Agent for Program Repair

arXiv 2403.17134 ↗First posted 25 Mar 2024cs.SE cs.AIcited by 225

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Automated program repair has emerged as a powerful technique to mitigate the impact of software bugs on system reliability and user experience. This paper introduces RepairAgent, the first work to address the program repair challenge through an autonomous agent based on a large language model (LLM). Unlike existing deep learning-based approaches, which prompt a model with a fixed prompt or in a fixed feedback loop, our work treats the LLM as an agent capable of autonomously planning and executing actions to fix bugs by invoking suitable tools. RepairAgent freely interleaves gathering information about the bug, gathering repair ingredients, and validating fixes, while deciding which tools to invoke based on the gathered information and feedback from previous fix attempts. Key contributions that enable RepairAgent include a set of tools that are useful for program repair, a dynamically updated prompt format that allows the LLM to interact with these tools, and a finite state machine that guides the agent in invoking the tools. Our evaluation on the popular Defects4J dataset demonstrates RepairAgent's effectiveness in autonomously repairing 164 bugs, including 39 bugs not fixed by prior techniques. Interacting with the LLM imposes an average cost of 270,000 tokens per bug, which, under the current pricing of OpenAI's GPT-3.5 model, translates to 14 cents of USD per bug. To the best of our knowledge, this work is the first to present an autonomous, LLM-based agent for program repair, paving the way for future agent-based techniques in software engineering.

Key facts. Cited by 225 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 42 of its 78 references that are in the map. First posted on arXiv 25 Mar 2024.

Builds on

42 of 78 references.

References · 42

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
  4. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  5. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
  6. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
  7. 2022PAL: Program-aided Language Modelscited by 635
  8. 2023Augmented Language Models: a Surveycited by 398
  9. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  10. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
  11. 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
  12. 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
30 more
  1. 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
  2. 2022Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproductioncited by 110
  3. 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
  4. 2023Fuzz4All: Universal Fuzzing with Large Language Modelscited by 88
  5. 2023Impact of Code Language Models on Automated Program Repaircited by 85
  6. 2023An In-Context Learning Agent for Formal Theorem-Provingcited by 78
  7. 2024Automated Unit Test Improvement using Large Language Models at Metacited by 73
  8. 2022Repair Is Nearly Generation: Multilingual Program Repair with LLMscited by 68
  9. 2019TBar: Revisiting Template-based Automated Program Repaircited by 64
  10. 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
  11. 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
  12. 2023A Survey of Learning-based Automated Program Repaircited by 55
  13. 2019On Learning Meaningful Code Changes via Neural Machine Translationcited by 50
  14. 2021Neural Program Repair with Execution-based Backpropagationcited by 50
  15. 2019Getafix: Learning to Fix Bugs Automaticallycited by 40
  16. 2023Explainable Automated Debugging via Large Language Model-driven Scientific Debuggingcited by 40
  17. 2023Prompting Is All You Need: Automated Android Bug Replay with Large Language Modelscited by 40
  18. 2019Neural Program Repair by Jointly Learning to Localize and Repaircited by 39
  19. 2019How Often Do Single-Statement Bugs Occur? The ManySStuBs4J Datasetcited by 35
  20. 2022SelfAPR: Self-supervised Program Repair with Test Execution Diagnosticscited by 33
  21. 2018Nopol: Automatic Repair of Conditional Statement Bugs in Java Programscited by 32
  22. 2019Learning to Fix Build Errors with Graph2Diff Neural Networkscited by 26
  23. 2022Code Search: A Survey of Techniques for Finding Codecited by 18
  24. 2023ITER: Iterative Neural Repair for Multi-Location Patchescited by 16
  25. 2024CigaR: Cost-efficient Program Repair with LLMscited by 14
  26. 2024GitBug-Java: A Reproducible Benchmark of Recent Java Bugscited by 13
  27. 2018Learning to Repair Software Vulnerabilities with Generative Adversarial Networkscited by 11
  28. 2024PyTy: Repairing Static Type Errors in Pythoncited by 10
  29. 2017Data-Driven Feedback Generation for Introductory Programming Exercisescited by 9
  30. 2023StaticFixer: From Static Analysis to Static Repaircited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 23; 2025: 82; 2026: 120.

225 papers.

Sort:

By area:

  1. 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 622
  2. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  3. 2025Memory in the Age of AI Agentscited by 285
  4. 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
  5. 2025MultiAgentBench: Evaluating the Collaboration and Competition of LLM agentscited by 169
  6. 2025Goedel-Prover-V2: Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-Correctioncited by 140
  7. 2024MAGIS: LLM-Based Multi-Agent Framework for GitHub Issue Resolutioncited by 132
  8. 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 129
  9. 2024G-Designer: Architecting Multi-agent Communication Topologies via Graph Neural Networkscited by 110
  10. 2025Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scalingcited by 93
  11. 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 85
  12. 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
38 more
  1. 2025LLM Agents for Education: Advances and Applicationscited by 59
  2. 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
  3. 2025On the Use of Agentic Coding: An Empirical Study of Pull Requests on GitHubcited by 53
  4. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  5. 2024Evaluating Mathematical Reasoning of Large Language Models: A Focus on Error Identification and Correctioncited by 45
  6. 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
  7. 2025Reducing Cost of LLM Agents with Trajectory Reductioncited by 44
  8. 2024Can LLMs Replace Manual Annotation of Software Engineering Artifacts?cited by 40
  9. 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 40
  10. 2025Repo2Run: Automated Building Executable Environment for Code Repository at Scalecited by 39
  11. 2025Evaluating Agent-based Program Repair at Googlecited by 35
  12. 2025Understanding Code Agent Behaviour: An Empirical Study of Success and Failure Trajectoriescited by 30
  13. 2025Automated Benchmark Generation for Repository-Level Coding Taskscited by 27
  14. 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunitiescited by 26
  15. 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agentcited by 24
  16. 2025Issue Localization via LLM-Driven Iterative Code Graph Searchingcited by 22
  17. 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugscited by 22
  18. 2024Beyond pip install: Evaluating LLM Agents for the Automated Installation of Python Projectscited by 21
  19. 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
  20. 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
  21. 2025Agentic AI Software Engineers: Programming with Trustcited by 19
  22. 2025Unified Software Engineering Agent as AI Software Engineercited by 17
  23. 2025A Survey on Agentic Security: Applications, Threats and Defensescited by 17
  24. 2026LongMemEval-V2: Evaluating Long-Term Agent Memory Toward Experienced Colleaguescited by 17
  25. 2025AgentGuard: Runtime Verification of AI Agentscited by 16
  26. 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositoriescited by 15
  27. 2025CompileAgent: Automated Real-World Repo-Level Compilation with Tool-Integrated LLM-based Agent Systemcited by 15
  28. 2026AIDev: Studying AI Coding Agents on GitHubcited by 15
  29. 2026Inside the Scaffold: A Source-Code Taxonomy of Coding Agent Architecturescited by 15
  30. 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
  31. 2026Wink: Recovering from Misbehaviors in Coding Agentscited by 11
  32. 2026Failure as a Process: An Anatomy of CLI Coding Agent Trajectoriescited by 11
  33. 2026TRACE: Turn-level Reward Assignment via Credit Estimation for Long-Horizon Agentscited by 11
  34. 2024LLM Agent for Fire Dynamics Simulationscited by 10
  35. 2025SynWorld: Virtual Scenario Synthesis for Agentic Action Knowledge Refinementcited by 9
  36. 2025Large Language Models for Security Operations Centers: A Comprehensive Surveycited by 9
  37. 2026SGAgent: Suggestion-Guided LLM-Based Multi-Agent Framework for Repository-Level Software Repaircited by 9
  38. 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generationcited by 8

50 most cited of 225 All 225 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2024An Empirical Study on LLM-based Agents for Automated Bug Fixing
  2. 2025Understanding Automated Program Repair Agents Through the Lens of Traceability: An Empirical Study
  3. 2025A Survey of LLM-based Automated Program Repair: Taxonomies, Design Paradigms, and Applications
  4. 2026SelfHeal: Empirical Fix Pattern Analysis and Bug Repair in LLM Agents
  5. 2024An Empirical Evaluation of Pre-trained Large Language Models for Repairing Declarative Formal Specifications
  6. 2026Kozuchi Agent: A Language-Agnostic Open-Weight Agent for Software Repair
  7. 2024ThinkRepair: Self-Directed Automated Program Repair
  8. 2024MarsCode Agent: AI-native Automated Bug Fixing