Before Generating Again, Repair the Failed Step
TL;DR for operators When an automated checker rejects an AI-generated step, generating another candidate is not the only response. The error message may contain enough information to correct the rejected step. A study of compiler-guided repair in Lean 41 finds that: Repair increases completed proofs. With up to three repairs, theorem-solving coverage improves by 2.3–4.1 percentage points across four initial candidate budgets on 1,990 LeanDojo theorems. The first repair does most of the work. One correction attempt captures 84–96% of the cumulative net gain achieved with three. Higher coverage comes with latency. At the largest candidate budget, three repairs increase mean runtime from 200.5 to 485.7 seconds. Matched-runtime comparisons generally favor one repair, but tight deadlines can reverse the advantage. Failure type matters. One repair corrects 14.6% of no-progress/simplification failures but only 1.8% of type mismatches. For teams building systems that generate machine-checkable outputs, the practical hypothesis is to try one targeted correction when diagnostics are actionable, then measure whether additional repair is preferable to regeneration or broader replanning. ...