Portfolio Project — Built during an e-commerce web development internship. Articles are from the real publication; books, magazines, pricing, and store functionality are placeholder content. This platform is designed to grow into a live independent press.
Back to Essay Archive
AI & Cognition
AI & Cognition7 min read·July 8, 2026

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.

ZS
Zainab Shujat
Founder & Editor

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.

Filed Under:#ai#claude#deep-learning#reasoning#under-the-hood

Related Essays & Studies

CONTINUE READING FROM THE ARCHIVE

Web Architecture4m

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.

August 4, 2026Read
The Engineer’s Craft6m

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.

May 31, 2026Read