Feature Deep-Dive
Solve Hard Problems Correctly with Extended Thinking
Deep reasoning mode — for when the answer actually matters
Extended Thinking gives Claude a reasoning budget — a scratchpad to think through a problem step by step before producing a final answer. On hard math, complex code, and multi-variable decisions, it dramatically improves accuracy. On simple tasks, it adds latency with no benefit.
How It Works
The mechanics of Extended Thinking
When you enable Extended Thinking via the API (or in Claude.ai for supported plans), you allocate a "thinking budget" in tokens. Claude uses this budget to reason through the problem in a hidden scratchpad before writing its final response. The reasoning process is visible in the API response under a thinking block.
Extended Thinking is a production-grade implementation of chain-of-thought prompting. Instead of you adding "think step by step" to your prompt, Claude has an internal reasoning loop with a defined token budget. This matters because Claude can reconsider and backtrack within its thinking — something you can't easily replicate with prompt engineering alone.
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-opus-4-5",
max_tokens=16000,
thinking={
"type": "enabled",
"budget_tokens": 10000 # reasoning budget
},
messages=[{
"role": "user",
"content": "Prove that sqrt(2) is irrational."
}]
)
# Access the thinking block
for block in response.content:
if block.type == "thinking":
print("Reasoning:", block.thinking)
elif block.type == "text":
print("Answer:", block.text)Decision Guide
When to use Extended Thinking
Competition math, proofs, formal logic, and algorithmic reasoning. Extended thinking lets Claude work through each step carefully before committing to an answer.
Architecture decisions, debugging subtle logic errors, designing data models. Extended thinking produces more considered code with fewer edge case failures.
Evaluating trade-offs, comparing options with multiple variables, synthesizing competing research findings. Thinking mode lets Claude hold more complexity simultaneously.
Asking what the capital of France is, or what a function returns — standard mode is faster and cheaper. Extended thinking adds latency with no accuracy benefit on simple retrieval.
For most creative tasks — drafting a blog post, brainstorming names, writing emails — standard Claude performs identically to extended thinking. The extra reasoning budget doesn't improve prose quality.
Extended thinking takes longer — sometimes significantly. If your app needs sub-2-second responses (chatbots, live search, inline suggestions), use standard mode and optimize your prompt instead.
Real Examples
Standard vs Extended: what actually changes
Claude gives an answer — often correct, sometimes with arithmetic errors on complex systems
Claude works through each substitution step, catches sign errors, and verifies the solution — dramatically higher accuracy
Identifies the obvious suspects, may miss timing-dependent edge cases
Traces execution order explicitly, considers thread interleaving scenarios, produces a more complete diagnosis
Fast, high-quality output in seconds
Same quality, much slower. Not worth the wait
Good schema for straightforward requirements
Considers normalization trade-offs, future query patterns, and indexing strategy more thoroughly
Go deeper on Claude's reasoning capabilities
The prompt engineering track covers thinking modes, chain-of-thought, and advanced techniques.