BeClaude
Guide2026-04-27

Mastering Extended Thinking in Claude: A Practical Guide to Adaptive and Manual Reasoning

Learn how to enable and optimize Claude's extended thinking for complex tasks. Covers adaptive thinking, manual mode, effort parameters, code examples, and model-specific behaviors.

Quick Answer

This guide teaches you how to use Claude's extended thinking feature to enhance reasoning for complex tasks. You'll learn the difference between adaptive and manual thinking, how to configure effort parameters, and see practical API code examples for Claude Opus 4.7, Sonnet 4.6, and other models.

extended thinkingClaude APIadaptive thinkingreasoningmodel capabilities

Introduction

Claude's extended thinking feature is a powerful tool that gives the model enhanced reasoning capabilities for complex tasks. When enabled, Claude generates internal reasoning steps before producing its final answer, providing you with varying levels of transparency into its thought process. This guide will walk you through everything you need to know to effectively use extended thinking in your applications.

How Extended Thinking Works

When extended thinking is turned on, Claude creates special thinking content blocks in its response. These blocks contain the model's step-by-step reasoning, followed by the final text content block with the answer. Here's what a typical response looks like:

{
  "content": [
    {
      "type": "thinking",
      "thinking": "Let me analyze this step by step...",
      "signature": "WaUjzkypQ2mUEVM36O2TxuC06KN8xyfbJwyem2dw3URve/op91XWHOEBLLqIOMfFG/UvLEczmEsUjavL...."
    },
    {
      "type": "text",
      "text": "Based on my analysis..."
    }
  ]
}

The thinking block includes a cryptographic signature that can be used to verify the integrity of the reasoning. This is particularly useful for auditing and compliance purposes.

Adaptive Thinking vs. Manual Extended Thinking

Claude offers two modes for extended thinking, and the right choice depends on the model you're using.

Adaptive Thinking (Recommended for Claude Opus 4.7+)

Adaptive thinking is the modern approach, introduced with Claude Opus 4.7 and later models. Instead of setting a fixed token budget, you specify an effort level that tells Claude how much reasoning to apply relative to the task complexity.

Key parameters:
  • type: "adaptive" — enables adaptive thinking
  • effort — controls the reasoning intensity (low, medium, high)
  • task_budgets (beta) — optional fine-tuning for specific task types
  • fast_mode (beta: research preview) — enables faster responses with potentially less reasoning
Example request:
import anthropic

client = anthropic.Anthropic()

response = client.messages.create( model="claude-opus-4-7", max_tokens=16000, thinking={ "type": "adaptive", "effort": "high" }, messages=[ {"role": "user", "content": "Solve this complex math problem: integrate x^2 * sin(x) from 0 to pi"} ] )

print(response.content)

TypeScript example:
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

const response = await client.messages.create({ model: 'claude-opus-4-7', max_tokens: 16000, thinking: { type: 'adaptive', effort: 'high' }, messages: [ { role: 'user', content: 'Solve this complex math problem: integrate x^2 * sin(x) from 0 to pi' } ] });

console.log(response.content);

Manual Extended Thinking (Deprecated but Still Functional)

Manual extended thinking uses a fixed token budget. While it's being phased out on newer models, it still works on Claude Opus 4.6, Claude Sonnet 4.6, and Claude Mythos Preview.

Key parameters:
  • type: "enabled" — enables manual thinking
  • budget_tokens — the maximum number of tokens Claude can use for reasoning (must be at least 1024 and less than max_tokens)
Example request:
import anthropic

client = anthropic.Anthropic()

response = client.messages.create( model="claude-sonnet-4-6", max_tokens=16000, thinking={ "type": "enabled", "budget_tokens": 8000 }, messages=[ {"role": "user", "content": "Analyze the implications of quantum computing on cryptography"} ] )

print(response.content)

Model-Specific Behavior

Different Claude models handle extended thinking differently. Here's a quick reference:

ModelAdaptive ThinkingManual ThinkingNotes
Claude Opus 4.7+✅ Recommended❌ Returns 400 errorUse effort parameter
Claude Opus 4.6✅ Recommended⚠️ Deprecated but functionalMigrate to adaptive
Claude Sonnet 4.6✅ Recommended⚠️ Deprecated (interleaved mode)Migrate to adaptive
Claude Mythos Preview✅ Default✅ Accepteddisabled not supported; use display: "summarized" for summaries

Claude Mythos Preview Special Behavior

Claude Mythos Preview has unique behavior:

  • Adaptive thinking is the default mode
  • thinking: {type: "disabled"} is not supported
  • The display defaults to "omitted" (no thinking content returned)
  • Pass display: "summarized" to receive summaries of the reasoning
response = client.messages.create(
    model="claude-mythos-preview",
    max_tokens=16000,
    thinking={
        "type": "adaptive",
        "effort": "medium",
        "display": "summarized"
    },
    messages=[
        {"role": "user", "content": "Explain the concept of recursion in programming"}
    ]
)

Choosing the Right Effort Level

The effort parameter in adaptive thinking lets you control how much reasoning Claude applies:

  • Low: Minimal reasoning — best for simple tasks where you want fast responses
  • Medium: Balanced reasoning — good for most complex tasks
  • High: Maximum reasoning — ideal for very complex problems requiring deep analysis
When to use each:
EffortUse Case
LowQuick answers, simple Q&A, straightforward data extraction
MediumCode generation, analysis, moderate problem-solving
HighComplex math, multi-step reasoning, strategic planning

Best Practices for Extended Thinking

1. Set Appropriate max_tokens

Extended thinking consumes tokens from your max_tokens budget. If you set budget_tokens to 8000 and max_tokens to 16000, Claude will use up to 8000 tokens for thinking and up to 8000 for the final response. Always ensure max_tokens is greater than budget_tokens.

2. Use Adaptive Thinking for New Models

If you're using Claude Opus 4.7 or later, adaptive thinking is your only option. For older models, migrate to adaptive thinking as soon as possible to future-proof your application.

3. Handle Thinking Blocks in Your Application

When processing responses, you'll need to handle both thinking and text content blocks. Here's a pattern for extracting the final answer:

def extract_final_answer(response):
    for block in response.content:
        if block.type == "text":
            return block.text
    return None

Usage

final_answer = extract_final_answer(response) print(final_answer)

4. Verify Signatures for Compliance

If you need to audit Claude's reasoning, you can verify the cryptographic signature in the thinking block. This ensures the thinking hasn't been tampered with.

5. Consider Fast Mode for Latency-Sensitive Apps

If you're building real-time applications, the beta fast_mode parameter can reduce response times. Note that this may result in less thorough reasoning.

response = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=16000,
    thinking={
        "type": "adaptive",
        "effort": "medium",
        "fast_mode": True  # Beta feature
    },
    messages=[
        {"role": "user", "content": "Summarize this article in 3 bullet points"}
    ]
)

Common Pitfalls to Avoid

  • Setting budget_tokens too low: Must be at least 1024 tokens. If you set it too low, Claude won't have enough room to reason effectively.
  • Forgetting max_tokens: Extended thinking requires max_tokens to be set. Without it, the API will return an error.
  • Using manual thinking on Opus 4.7+: This will return a 400 error. Always use adaptive thinking for these models.
  • Ignoring model-specific behavior: Claude Mythos Preview, for example, doesn't support disabled thinking. Always check the model's documentation.

Conclusion

Extended thinking is one of Claude's most powerful features, enabling the model to tackle complex reasoning tasks with transparency. By understanding the differences between adaptive and manual thinking, choosing the right effort level, and following best practices, you can unlock Claude's full potential for your applications.

As Anthropic continues to evolve the API, adaptive thinking with the effort parameter is the future. Start migrating your code today to take advantage of the latest improvements.

Key Takeaways

  • Adaptive thinking (with effort parameter) is the recommended approach for Claude Opus 4.7+ and should be used for all new projects.
  • Manual extended thinking (budget_tokens) is deprecated on newer models but still functional on Claude Opus 4.6 and Sonnet 4.6.
  • Always set max_tokens higher than your thinking budget to ensure Claude has room for both reasoning and the final answer.
  • Handle thinking blocks in your application code to extract the final text response from the API output.
  • Model behavior varies — check the documentation for your specific model, especially Claude Mythos Preview which has unique display defaults.