Repeton: Structured Bug Repair with ReAct-Guided Patch-and-Test Cycles

Nguyen Phu Vinh, Anh Chung Hoang, Chris Ngo, Truong-Son HyarXiv 2025 · DOI · arXiv

Abstract

Repeton is a fully open-source framework designed to automate software bug repair through an iterative "patch-and-test" cycle guided by Large Language Models (LLMs). By substituting complex neural retrieval systems with transparent symbolic reasoning and lightweight heuristics, Repeton provides a reproducible and interpretable path for autonomous debugging agents. Using the DeepSeek-R1 model, the framework achieves an 11.67% success rate on the SWE-bench Lite benchmark, demonstrating that general-purpose open-weight models can be highly competitive when integrated into a robust, structured pipeline.

Introduction

Software debugging is one of the most cognitively demanding aspects of development. While LLMs have shown promise in code generation, applying them to real-world, multi-file repositories often results in low precision and a "black-box" process that is difficult to trust or debug. Existing autonomous debugging frameworks frequently rely on closed-source APIs or complex Retrieval-Augmented Generation (RAG) using vector embeddings, which adds infrastructure complexity and can be difficult to tune for specific codebase nuances. Repeton addresses these challenges by employing a modular pipeline that mimics the manual debugging process used by human developers, prioritizing symbolic reasoning over neural retrieval.

Methods

The Repeton framework operates through two primary modules designed to navigate and repair complex codebases:

  1. Iterative Repair and Validation (IRV): This high-level loop distills bug reports into concise summaries and uses a ReAct-style (Reason + Act) flow to build reproduction test cases. If a test fails, confirming the bug's existence, the system moves to the patching phase.
  2. Iterative Code Search and Repair (ICSR): Instead of neural embeddings, Repeton uses a four-stage symbolic process: keyword extraction, file identification via directory tree queries, file summarization to manage context windows, and precise localization for conservative, one-region-at-a-time patching.
The high-level Iterative Repair and Validation (IRV) loop in Repeton.

Crucially, the system includes a rollback mechanism. If the agent selects an irrelevant file or makes an incorrect edit, it can backtrack, explain the mismatch, and attempt a different path based on previous feedback. This ensures the agent remains grounded in the repository's actual structure.

Results and Key Insights

Repeton was evaluated on SWE-bench Lite, a benchmark consisting of 300 real-world GitHub issues. The framework achieved a 11.67% success rate, significantly outperforming the "Moatless Tools + DeepSeekV3" baseline, which failed to resolve any issues (0%).

Performance comparison of Repeton against baselines on SWE-bench Lite.

While Repeton did not surpass the specialized Swe-Fixer (24.67%), which uses dedicated fine-tuning, its performance highlights several key insights:

  • Symbolic Search Effectiveness: Structured, keyword-based search of a directory tree can be more effective and transparent than complex vector-embedding RAG systems for debugging tasks.
  • The Utility of ReAct: Tightly coupling reasoning and action allows the agent to self-correct and reason about architecture using high-level maps (classes and line spans) without exhausting context windows.
  • Conservative Patching: Enforcing a rule of modifying only one code region per iteration prevents the hallucination of sweeping, destructive changes.

Conclusion

Failure analysis identified three main bottlenecks: "reasoning runaway," where long Chain of Thought sequences exhaust context windows; file identification errors due to keyword heuristic failures; and reproduction failures that prevent the validation loop from starting. Future work will focus on refining keyword extraction and optimizing the reasoning-to-action ratio to prevent context overflow, further enhancing the viability of open-source autonomous debugging agents.

Summary updated

Abstract

Large Language Models (LLMs) have shown strong capabilities in code generation and comprehension, yet their application to complex software engineering tasks often suffers from low precision and limited interpretability. We present Repeton, a fully open-source framework that leverages LLMs for precise and automated code manipulation in real-world Git repositories. Rather than generating holistic fixes, Repeton operates through a structured patch-and-test pipeline: it iteratively diagnoses issues, proposes code changes, and validates each patch through automated testing. This stepwise process is guided by lightweight heuristics and development tools, avoiding reliance on embedding-based retrieval systems. Evaluated on the SWE-bench Lite benchmark, our method shows good performance compared to RAG-based methods in both patch validity and interpretability. By decomposing software engineering tasks into modular, verifiable stages, Repeton provides a practical path toward scalable and transparent autonomous debugging.
BibTeX
@misc{vinh2025repeton,
  author = {Nguyen Phu Vinh and Anh Chung Hoang and Chris Ngo and Truong-Son Hy},
  title = {{Repeton: Structured Bug Repair with ReAct-Guided Patch-and-Test Cycles}},
  year = {2025},
  eprint = {2506.08173},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.08173},
}
Figure