akash@sharma:~/blogs$ cat hidden-thinking.md

The tokens you pay for but never see

Hidden thinking in modern LLM APIs, measured on a small exercise

I asked a model a one-line question about a recurring alert. Forty-three percent of the output tokens I paid for were text I never saw. When I lowered the token limit to 50, I got no answer at all, and the API still returned HTTP 200.

Neither of these is a bug. Both are how reasoning models work by default now. And both break assumptions that most of us carry over from “normal” APIs: that what you see is what you pay for, and that a 200 means you got a result.

This post explains what hidden thinking is, using the providers’ own documentation, then shows what I measured on a small exercise you can rerun yourself.

What “hidden thinking” is

Modern models (Claude 5, OpenAI’s reasoning models and others) generate reasoning tokens before the answer. On the Claude API this is on by default, and by default you don’t see it: the response contains a thinking block whose text is empty, plus an encrypted signature. The model really did think. It’s ordinary token generation on the provider’s servers, in the same call, just not returned to you.

The docs are explicit about the billing. From Anthropic’s Steering thinking page:

“The billed output token count does not match the visible token count in the response. You are billed for the full thinking process, not the thinking content visible in the response.”

The same page lists what you’re charged for: the thinking tokens (as output), the thinking blocks from earlier turns that stay in context (as input), and the normal answer text. Asking for a readable summary (display: "summarized") doesn’t change the price: you pay for the full thinking either way, and the summary itself is free. (Whether it changes how much the model thinks is another question; see finding 4.)

OpenAI describes the same model for its reasoning models: reasoning tokens aren’t visible through the API but take up context space and are billed as output tokens.

How much thinking is “normal”? No provider publishes a percentage, and for good reason: it depends on the model, the effort setting and the task. Research shows the effect can be extreme on easy questions. In Do NOT Think That Much for 2+3=? (Chen et al., Tencent AI Lab, 2024), reasoning models (QwQ-32B-Preview, DeepSeek-R1) used on average 1,953% more tokens than conventional models to answer “what is 2 plus 3?”. The authors call this overthinking: “excessive computational resources are allocated for simple problems with minimal benefit.”

So rather than quote a universal number, I measured my own.

The exercise

A small Python script against the raw Claude API, with no framework: claude-haiku-5-5, default settings (adaptive thinking, medium effort, thinking display omitted). The question:

“An alert fires every day at 02:00 UTC for about 3 minutes, then clears on its own. Give the three most likely causes, ranked, one line each.”

I read every field of the raw response, then repeated the experiment with a smaller token limit, with streaming to time the first word, and in a multi-turn chat. The code and the raw output of every run are in my repo: ai-engineering / E01-chat-cli.

Caveat up front: this is one model, one week, a handful of calls. These numbers illustrate the mechanics; they are not a benchmark. Your share of thinking will differ.

What I measured

1. Almost half of the output was invisible

Call Output tokens Of which thinking Visible answer
Default settings 286 122 (43%) 164

The only place the thinking shows up is usage.output_tokens_details.thinking_tokens. The visible text tells you nothing. Across a long session with a coding agent (I read my own Claude Code session log), thinking was 28% of output tokens.

2. A small limit gives you nothing at all, with a 200

max_tokens Content blocks Stop reason Answer
2,000 thinking, text end_turn yes
50 thinking only max_tokens none

max_tokens caps thinking and answer together. All 50 tokens went to thinking, so there was no text block at all. The call “succeeded”. Code that reads response.content[0].text crashes, because block 0 is the thinking block; code that searches for a text block finds nothing.

Later, with a 60-token limit, the model happened not to think, so it returned a truncated answer that read like a complete one. Two different failures, one signal: stop_reason: "max_tokens".

3. Users wait for thinking they never see

With streaming, I timed the first event from the server and the first word of the answer:

Run Thinking tokens First event First answer word Total
Thinking hidden (default) 216 0.81 s 1.81 s 3.25 s

The second between “the server started” and “the first word” is the hidden thinking: 216 tokens at about 200 tokens per second is about 1.06 seconds. Across my runs, a simple rule held up well:

time to first word ≈ ~0.5 s fixed overhead + thinking tokens ÷ ~200 tokens/s

(For comparison, reading input is far faster: 77,000 extra input tokens added only ~0.4 s. Long prompts cost money; thinking and long answers cost time.)

4. Showing the thinking feels faster, but the answer arrives later

With display: "summarized", the thinking summary starts streaming almost immediately, so the app looks responsive. But when does the actual answer start?

My first comparison suggested something dramatic: in two single-call comparisons, the summarized call thought about twice as much (243 vs 122 and 394 vs 216 thinking tokens). It would have made a great headline. So I tested it properly: the same question 20 times with each setting, interleaved, 60 calls in total ($0.01).

Setting (20 calls each) Thinking tokens: mean (range) First answer word Total time
No thinking parameter 233 (157–337) 1.70 s 2.67 s
display: "omitted" 254 (161–400) 1.84 s 2.87 s
display: "summarized" 242 (156–341) 2.73 s 2.81 s
  • The “twice as much thinking” was noise. The averages are within 9% of each other, and a permutation test says differences this size happen by chance (p = 0.27–0.63). My two single comparisons had just landed at different points of a wide spread.
  • The delay is real. With a summary, the first word of the answer came about 0.9 seconds later. Even the fastest summarized call (2.41 s) was slower than the average hidden one. In 20,000 random relabellings, not one produced a gap that big.
  • Total time was the same. The summary doesn’t make the call longer; it pushes the answer to the end, where it arrives in a burst.

So: same tokens, same bill, same total time, but users wait almost a second longer to see the answer. If your users don’t read the reasoning, keep it hidden.

Sixty calls on one question is still a small experiment. Running the same comparison at a much larger scale, across many prompts, effort levels, models and times of day, would give more accurate numbers and show whether the delay holds everywhere. If you run something like this on your own traffic, the experiment script is here.

5. You pay for it twice

In a multi-turn chat you resend the history every turn, and this model keeps earlier thinking blocks in that history. So turn 1’s thinking is billed as output once, then as input on every later turn:

Turn Input tokens Output (thinking)
1 55 1,301 (561)
2 1,372 580 (58)
3 1,984 102 (69)

Turn 2’s input is almost exactly turn 1’s input plus turn 1’s full output, thinking included.

What about the readable summary, if you asked for one? It goes back in the request too (you must return the thinking block unchanged), so is it counted as input as well? I tested it with ten two-turn chats, five with each setting (script). In all ten, turn 2’s input was exactly turn 1’s input plus turn 1’s full output plus 15 tokens for the new question, with or without a summary. The ~200-token summaries added nothing. The API uses the full thinking carried in the encrypted signature, and the summary is display-only. (One summary was even longer than the 159 thinking tokens it summarised, which shows again that what you see isn’t what you pay for.)

6. You can’t predict it per call

Sixty identical requests in the experiment above produced anywhere from 156 to 400 thinking tokens, a 2.5× spread. Across different contexts the same alert question got anything from 0 (with a short system prompt) to 561 (as the first turn of a chat). That’s by design: Anthropic’s docs say the model “evaluates the complexity of the input and determines whether deeper reasoning would improve the answer,” on every request. A one-word reply (“Reply with exactly the word OK”) got zero.

The docs also note that, for this model, telling it in the prompt to answer directly didn’t stop it from thinking; the supported lever is the effort setting.

What I do differently now

  1. Read cost from usage, never from the text. Log output_tokens_details.thinking_tokens per call, and the thinking share per feature.
  2. Check stop_reason on every call. Alert on max_tokens: it means a missing or truncated answer, even with HTTP 200.
  3. Find the answer by block type, never content[0].
  4. Size max_tokens for the worst case, not the typical call. Thinking varies by an order of magnitude on similar inputs.
  5. Steer with effort, not prompts, and measure the effect on your own traffic.
  6. Keep thinking hidden unless users read it. Same tokens and cost, but the answer starts ~0.9 s sooner.
  7. Pass thinking blocks back unchanged in multi-turn and tool-use flows. Rebuilding the assistant message from its text silently drops them.

The broader lesson for anyone building on LLMs: the visible text is not the workload. Cost, latency and truncation all live in the metadata. Log it from day one.

References

Measured with claude-haiku-5-5 on the Claude API, November 2026. Prices, defaults and behaviour change quickly; check the current docs before relying on any number here.