BeClaude
Guide2026-04-28

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

Learn how to use Claude's extended thinking capabilities—adaptive and manual modes—to enhance reasoning for complex tasks, with practical API examples and best practices.

Quick Answer

This guide explains how to enable and optimize Claude's extended thinking feature, covering adaptive thinking (recommended for Claude Opus 4.7+) and manual mode (deprecated but functional on older models). You'll learn API usage, response formats, and best practices for complex reasoning tasks.

Extended ThinkingClaude APIAdaptive ThinkingReasoningPrompt Engineering

Introduction

Claude's extended thinking feature unlocks enhanced reasoning capabilities for complex tasks, allowing the model to "think through" problems step-by-step before delivering a final answer. Whether you're building a sophisticated code analysis tool, a multi-step reasoning agent, or a deep research assistant, extended thinking provides the transparency and depth needed for high-quality outputs.

This guide covers everything you need to know: the two modes of extended thinking (adaptive and manual), how to implement them in the API, and best practices to get the most out of Claude's reasoning abilities.

How Extended Thinking Works

When extended thinking is enabled, Claude generates thinking content blocks that contain its internal reasoning process. These blocks appear before the final text response in the API output. The model uses this reasoning to refine its answer, making it more accurate and thorough.

Here's a simplified example of the response structure:

{
  "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 contains the raw reasoning, and the signature is used for verification. The text block is the final answer.

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. This is more flexible and efficient.

Key Parameters

  • type: "adaptive" – Enables adaptive thinking.
  • effort – Controls reasoning depth. Options: "low", "medium", "high". Higher effort means more thorough reasoning but also higher token usage.
  • budget_tokens (optional) – Sets a maximum token limit for thinking. If omitted, Claude uses a default budget based on the effort level.

API Example (Python)

import anthropic

client = anthropic.Anthropic()

response = client.messages.create( model="claude-opus-4-7", max_tokens=32000, thinking={ "type": "adaptive", "effort": "high", "budget_tokens": 16000 # optional }, messages=[ {"role": "user", "content": "Analyze the ethical implications of autonomous vehicles in urban environments."} ] )

print(response.content)

API Example (TypeScript)

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

const response = await client.messages.create({ model: 'claude-opus-4-7', max_tokens: 32000, thinking: { type: 'adaptive', effort: 'high', budget_tokens: 16000 }, messages: [ { role: 'user', content: 'Analyze the ethical implications of autonomous vehicles in urban environments.' } ] });

console.log(response.content);

Effort Levels Explained

EffortUse CaseToken Usage
lowSimple tasks, quick reasoningMinimal
mediumStandard complex tasksModerate
highDeep analysis, multi-step reasoningHigh

Manual Extended Thinking (Deprecated but Functional)

Manual extended thinking (type: "enabled") is the older approach where you explicitly set a budget_tokens value. It is deprecated on Claude Opus 4.7+ (returns a 400 error) but still works on Claude Opus 4.6 and Claude Sonnet 4.6. Anthropic recommends migrating to adaptive thinking.

API Example (Python)

response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=16000,
    thinking={
        "type": "enabled",
        "budget_tokens": 8000
    },
    messages=[
        {"role": "user", "content": "Solve this complex math problem: ..."}
    ]
)

Important Notes

  • budget_tokens must be less than max_tokens.
  • The thinking budget is a maximum; Claude may use fewer tokens.
  • On Claude Sonnet 4.6, manual mode uses interleaved thinking (thinking and text blocks alternate).

Model-Specific Behavior

ModelAdaptive ThinkingManual ThinkingNotes
Claude Opus 4.7+✅ Recommended❌ Returns 400 errorUse effort parameter
Claude Mythos Preview✅ Default✅ Acceptedtype: "disabled" not supported; use display: "summarized" for summaries
Claude Opus 4.6✅ Recommended⚠️ Deprecated but functional
Claude Sonnet 4.6✅ Recommended⚠️ Deprecated but functionalInterleaved mode

Best Practices for Extended Thinking

1. Choose the Right Effort Level

  • Low effort: Use for straightforward questions where you want a quick, reasoned answer without deep analysis.
  • Medium effort: Ideal for most complex tasks like code review, document analysis, or multi-step logic.
  • High effort: Reserve for tasks requiring deep reasoning, such as mathematical proofs, ethical dilemmas, or strategic planning.

2. Manage Token Budgets Wisely

Extended thinking consumes tokens. If you set budget_tokens too high, you may hit rate limits or incur higher costs. Start with a moderate budget and adjust based on your needs.

3. Handle Thinking Blocks in Your Application

When processing responses, you can:

  • Display thinking blocks to users for transparency (e.g., in a research tool).
  • Omit thinking blocks and only show the final text response.
  • Use signatures to verify the authenticity of the thinking content.

4. Combine with Other Features

Extended thinking works well with:

  • Structured outputs – For consistent response formats.
  • Tool use – Claude can reason about which tools to call and how to use them.
  • Prompt caching – Reduce latency for repeated reasoning patterns.

Common Pitfalls and Troubleshooting

  • 400 Error on Opus 4.7+: You're using type: "enabled" instead of type: "adaptive". Switch to adaptive mode.
  • Thinking budget too high: Ensure budget_tokens < max_tokens.
  • No thinking blocks in response: Verify that the model supports extended thinking and that you've enabled it correctly.
  • High latency: Reduce effort level or budget tokens for faster responses.

Conclusion

Extended thinking is a powerful feature that elevates Claude from a simple text generator to a deep reasoning engine. By mastering adaptive thinking (with the effort parameter) and understanding when to use manual mode, you can build applications that handle complex reasoning tasks with transparency and accuracy.

As Anthropic continues to evolve its models, adaptive thinking will become the standard. Start migrating your code today to take advantage of the flexibility and efficiency it offers.

Key Takeaways

  • Adaptive thinking (type: "adaptive") is the recommended approach for Claude Opus 4.7+; use the effort parameter to control reasoning depth.
  • Manual extended thinking (type: "enabled") is deprecated on newer models but still functional on Claude Opus 4.6 and Sonnet 4.6.
  • Effort levels (low, medium, high) let you balance reasoning depth with token usage and latency.
  • Thinking blocks provide transparency into Claude's reasoning process and can be displayed or omitted based on your application's needs.
  • Always check model compatibility before implementing extended thinking to avoid API errors.