Skip to content

Reasoning Trace Overflow in Code Generation: An Empirical Study of Explicit Reasoning ModelsReasoning-Trace Overflow in Code Generation: An Empirical Study of Explicit Reasoning Models

arXiv· arXiv:2611.06095· Lukas Twist, Helen Yannakoudakis, Jie M. Zhang·Indexed by this site · 18 days ago· Originally publishedAI updates
AI summary

The study proposes and quantifies the problem of reasoning trace overflow in code generation, where explicit reasoning models may spend their output budget on reasoning and never produce usable code. Experiments cover seven smaller open-weight reasoning models and six code benchmark settings, measuring reasoning occupancy, pass@1 and the effect of lightweight inference-time control under a fixed 32k token output budget. Overflow is rare on simple function-level tasks and common on harder benchmarks and for specific model families; in several model–benchmark combinations, more than half of generations exhausted the full 32k token budget still reasoning, and complete overflow is mostly associated with repetitive reasoning loops. For overflow-prone models, disabling reasoning may instead be competitive, since it at least guarantees an answer is produced; reasoning still has value for stronger models on harder algorithmic and code understanding tasks. Prompt guidance can substantially reduce overflow for some models but the effect is inconsistent, and budgeted transitions provide more direct control, improving both performance and token efficiency for overflow-prone models; the authors accordingly argue that explicit reasoning should be treated as a controllable resource in code generation rather than an always-on capability.

Read originalarxiv.org