TRANSMISSION // 2611.38055v1
When coding AI fails, should it switch to reasoning?
Source published
A preliminary study found that a local coding model solved more benchmark exercises after switching to reasoning mode—but the runs took longer, and small differences remain uncertain.

When a coding model’s answer fails its tests, should it make another quick attempt or change how it works? A preliminary study suggests that switching the same model into reasoning mode can help it pass more exercises. The improvement came with longer run times, and it is not yet clear how large or general the benefit is.
A coding model can produce a plausible-looking program that does not pass its tests. One response is to show it the failure and ask for another quick attempt. Another is to let it spend more effort reasoning through the problem. Brian K. Hudes’s preliminary report tests a simple version of that second approach: after repeated fast attempts fail, switch the same locally run model into reasoning mode and continue until the tests pass or the schedule ends.
The practical question is not only whether a model can solve a coding task, but how many attempts—and how much time—it takes to get a passing answer. The study compares fixed schedules of fast and reasoning-mode attempts, and also tests whether adding a second model changes the results.
A test result triggers the switch
The experiments used 225 exercises from the public Aider Polyglot benchmark, covering C++, Go, Java, JavaScript, Python and Rust. Each exercise came with a test suite. After every failed attempt, the model received the test output; the schedule stopped when an attempt passed. This “work-until-correct” setup differs from a leaderboard format that allows only an initial attempt and one retry.
The main single-model schedule, called 4+4, gave one local model four fast attempts followed by four attempts in reasoning mode. Variants switched after two or three fast attempts, or started a fresh conversation at the switch instead of carrying the earlier conversation forward. A comparison schedule allowed ten fast attempts. The study also tested a two-model schedule: the first local model made four fast and two reasoning-mode attempts, then a second local model handled the final two turns. Thus, the comparison includes both single-model and two-model configurations; it does not mean every run used two models.
All 225 exercises were used both to choose the schedule boundaries and to evaluate them. The results are therefore in-sample, rather than measurements on held-out tasks.
More exercises passed, but not faster
Across the escalation runs, 215 to 222 exercises passed, compared with 205 for the ten-fast-attempt baseline. The standard 4+4 schedule solved 216, 215 and 217 exercises in three runs. The two-model schedule solved 219 in each of two runs. Single-model schedules reached totals in the same range, so a second model was not necessary to achieve the solve counts observed. The evidence does not, however, rule out a small benefit from adding one.
The report’s results show that reasoning-mode attempts solved some exercises that remained open after the fast attempts. In the first two-model run, for example, the first reasoning-mode try solved 13 of the 28 exercises still unsolved at that point; the second solved 7 of the 15 still open. In the repeat, those two tries solved 12 of 25, then 2 of 13. These are counts from the tested schedules, not evidence that reasoning mode will help every model or task.
The extra solves did not mean faster results. The baseline’s median time to a passing solution among solved exercises was 10.3 seconds; escalation runs had medians from 10.9 to 14.8 seconds. Total wall-clock time was also longer: 2 hours 7 minutes for the baseline, compared with 2 hours 17 minutes to 5 hours for escalation runs. In this experiment, the trade-off was more exercises solved, not lower time.
Switching earlier, after two or three fast attempts, showed no accuracy gain distinguishable from run-to-run variation and took longer. Starting a fresh conversation at the switch looked promising for the 4+4 schedule: two corrected fresh-conversation runs solved 222 and 219 exercises, compared with 215 to 217 for three 4+4 runs that kept the conversation. The author describes a likely modest benefit, but says its size is not established. Results for fresh conversations at 2+4 were mixed.
How strong is the evidence?
Repeated runs of the same configuration did not always solve the same exercises. Specifically, the two 4+4 keep runs (the conversation continued across the switch) solved 216 and 215, but their per-exercise outcomes differed on nine exercises: four were solved only in the repeat and five only in the first run. Two 2+4 keep runs differed by four in their total solve counts. Such variation makes differences of a few exercises between schedules hard to interpret. The baseline was run once; most variants had only two or three runs.
Other limits matter too. The benchmark is public, so some exercises may have appeared in the models’ training data; the report did not test for overlap. The tasks are small, self-contained exercises with complete tests. The findings do not establish how the method would work on large repositories, ambiguous requirements or tasks without tests. The experimental harness used for the runs was not yet public, making independent reproduction harder. The author also notes that the schedule boundaries were tuned on the same exercises used to evaluate them.
The takeaway is narrow: in this particular local setup, switching one model from fast generation to reasoning mode after test failures was associated with more passing solutions than repeated fast attempts alone. It did not lower median solve time, and the report does not establish a universally best schedule. This is a preliminary arXiv report, not a basis for treating the results as settled. More repeated runs and evaluations with schedule choices fixed in advance on held-out exercises would help clarify the size and reliability of the effect.
- AI code generation
- local language models
- reasoning mode
- software testing
- Aider Polyglot benchmark
- benchmark evaluation
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
When execution traces help AI fix code—and when starting over works better
Shared method: Both papers evaluate iterative code-generation or repair loops that use test failures as feedback for further model attempts. Hudes studies switching the same model into reasoning mode after failures; Adnan and Kuhn compare trace-guided repair with fresh sampling after earlier repair attempts. This is a shared feedback-loop method, not a direct comparison of outcomes: the studies use different benchmarks, models, and interventions.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2611.38055v1 — Original paper
Excerpt reference:
static/papers/2611.38055v1.md:44-95
Basis: Paper text
Source file SHA-256:c8b0853704fa707b175d6613c7b18613686591b6cbb69980fe758efb44a50ff62611.09212v1 — Original paper
Excerpt reference:
static/papers/2611.09212v1.md:75-157
Basis: Paper text
Source file SHA-256:fd8a3c779ed1e99e2899ad13194140a6705d9c14f6ef62d6bb5f76374b603957
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
When execution traces help AI fix code—and when starting over works better
Source published
Shared keywords: ai code generation, software testing
How a Post-Session Score Went Wrong
Source published
Shared keywords: benchmark evaluation, software testing
Why simpler repair instructions may match a complex code-search method
Source published
Shared keywords: ai code generation
Teaching AI websites to work, not just look right
Source published
Shared keywords: ai code generation
Aynaz brings document-aware explanations onto your computer
Source published
Shared keywords: local language models