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

A token budget for reasoning

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.

Chain-of-thought at scale

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.

API usage
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

Use It
Multi-step math and logic

Competition math, proofs, formal logic, and algorithmic reasoning. Extended thinking lets Claude work through each step carefully before committing to an answer.

Use It
Complex coding tasks

Architecture decisions, debugging subtle logic errors, designing data models. Extended thinking produces more considered code with fewer edge case failures.

Use It
Strategic analysis

Evaluating trade-offs, comparing options with multiple variables, synthesizing competing research findings. Thinking mode lets Claude hold more complexity simultaneously.

Skip It
Simple factual Q&A

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.

Skip It
Creative writing

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.

Skip It
Real-time applications

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

Solve a system of equations
Standard Mode

Claude gives an answer — often correct, sometimes with arithmetic errors on complex systems

Extended Thinking

Claude works through each substitution step, catches sign errors, and verifies the solution — dramatically higher accuracy

Preferred
Debug a subtle race condition
Standard Mode

Identifies the obvious suspects, may miss timing-dependent edge cases

Extended Thinking

Traces execution order explicitly, considers thread interleaving scenarios, produces a more complete diagnosis

Preferred
Write a marketing email
Standard Mode

Fast, high-quality output in seconds

Preferred
Extended Thinking

Same quality, much slower. Not worth the wait

Design a database schema
Standard Mode

Good schema for straightforward requirements

Extended Thinking

Considers normalization trade-offs, future query patterns, and indexing strategy more thoroughly

Preferred

Go deeper on Claude's reasoning capabilities

The prompt engineering track covers thinking modes, chain-of-thought, and advanced techniques.