From Tool Traces to Strategy Banks: Mining Failure Signatures for Budgeted Repository-Level Code Repair
Abstract
Repository-level code repair generates rich tool traces, but most LLM agents discard this data and keep restarting from a fixed debugging loop. We present Evolutionary Self-Debugging Agents (ESDA), which mines tool traces into structured failure signatures and uses them to maintain a strategy bank of reusable debugging policies. Policies are stored as modular prompt genomes with typed slots, enabling slot-level reuse, mutation, and crossover as new tasks arrive. A cost-aware ranking objective prioritizes strategies that are likely to succeed in the first few evaluator calls under tight budgets. On RepoBench, ESDA solves 58.4% of tasks within the first two evaluator calls and reduces median wall-clock time by 3.0x compared to strong baselines. We further analyze transfer across languages and build systems and find that mining failure signatures yields consistent gains under distribution shift.