mlsanityData to 14 Oct 2026

From Brewing to Resolution: Tracing the Internal Lifecycle of Code Reasoning in LLMs

arXiv 2606.17648 ↗First posted 16 Jun 2026cs.AIcited by 0

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Standard accuracy metrics cannot explain why LLMs handle variable tracking but fail on semantically equivalent loops. We study an internal lifecycle of code reasoning in which models first brew the answer, making it linearly recoverable many layers before it becomes self-decodable, and then diverge into one of four resolution outcomes: Resolved, Overprocessed, Misresolved, or Unresolved. Understanding this lifecycle matters because similar task accuracies can mask fundamentally different failure modes that surface-level evaluation cannot detect. We introduce a dual diagnostic framework pairing layer-wise linear probing with Context-Stripped Decoding (CSD) and apply it to six code-reasoning task families across 16 models spanning Qwen, Llama, and DeepSeek architectures. All four outcomes carry substantial mass in every task family: overall Resolved is only 41.5%, with multiple tasks below 30%. Controlled sweeps over structure, depth, and operators expose task-specific failure bottlenecks: Function Call Resolved plunges from 61.1% to 2.5% as call depth increases from one to three. Across architectures and scales, the brewing scaffold remains stable, with normalized brewing duration 24-42% across all 16 models, while resolution success varies with capability. This indicates that the scaffold is a stable empirical regularity across the tested decoder-only Transformer families, whereas resolution success covaries with capability, scale, and training. Code: https://github.com/euyis1019/llm-brewing

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 12 of its 34 references that are in the map. First posted on arXiv 16 Jun 2026.

Builds on

12 of 34 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024Qwen2.5-Coder Technical Report18 Sep

Other references · 11

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  2. 2025Qwen3 Technical Reportcited by 8,820
  3. 2024Qwen2.5 Technical Reportcited by 4,942
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  5. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  6. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
  7. 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
  8. 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?cited by 7
  9. 2026Reasoning emerges from constrained inference manifolds in large language modelscited by 6
  10. 2025On LLMs' Internal Representation of Code Correctnesscited by 5
  11. 2026Code Correctness Is Linearly Decodable from LLM Hidden States Before Generationcited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Unveiling the Magic of Code Reasoning through Hypothesis Decomposition and Amendment
  2. 2025Breakpoint: Scalable evaluation of system-level reasoning in LLM code agents
  3. 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning
  4. 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs
  5. 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
  6. 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
  7. 2025Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation
  8. 2025textttReMind: Understanding Deductive Code Reasoning in LLMs