I Finally Found Out What Claude Is Doing While It's "Thinking"
Under the hood of extended reasoning: scratchpads, test-time compute, and what is actually happening when you wait.
The Magic Box and the Timer
For months, when using extended thinking models, I would stare at the timer ticking upward: *Thinking for 14s... Thinking for 28s...*
Like most developers, my default mental model was fuzzy: was it spinning up more GPU nodes? Was it executing Python in a sandboxed container? Was it running a Monte Carlo tree search over thousands of potential answers?
The reality turns out to be both simpler and much more fascinating.
1. Test-Time Compute vs. Training Compute
In classical machine learning, intelligence was baked into the model strictly during the pre-training and fine-tuning phases. Once weights were frozen, generating an answer was a single, forward pass of fixed compute per token. If you asked a model to write a haiku or derive general relativity, it expended roughly the same computational energy per token.
Reasoning models break this symmetry by leveraging **test-time compute**.
Instead of leaping directly to the final output token, the model generates an internal, private stream of thought tokens—a hidden scratchpad where it can:
1. **Decompose multi-step constraints:** Breaking an ambiguous prompt into explicit sub-tasks. 2. **Formulate internal hypotheses:** "If approach $A$ fails at the boundary condition, I should pivot to approach $B$." 3. **Backtrack and self-correct:** Spotting a logical hallucination *before* printing it to the user-facing transcript.
2. The Cognitive Scratchpad
What is fascinating as a student and software engineer is reading these reasoning traces. You see the model behaving remarkably like a developer writing notes on the margin of an exam paper:
``
Checking edge cases:
- What if array length is zero? -> Handled.
- What if input contains negative integers? -> Wait, line 14 assumes positive values. Let me rewrite the accumulator logic.
``
It turns out that "thinking" is not a mystical biological process; in language models, thinking is the luxury of talking to oneself before speaking in public.
Related Essays & Studies
CONTINUE READING FROM THE ARCHIVE
Attention Weights, Latent Manifolds, and Epistemic Illusions
We often speak of large language models as though they "understand" syntax. In reality, they trace geometric geodesics across hyper-dimensional manifold spaces. Here is an intuitive derivation for engineers.
The Cursor Knows When You're Thinking
Without it, an empty text box feels unfinished; with it, the same emptiness feels like an invitation. One tiny animation quietly tells your brain: something is waiting to become a thought.
The Code Was the Last Thing I Did
Vibe coding, originality, software engineering, debugging, writing, the Spiral Model, and why I think the conversation around AI is often focused on the wrong thing.