BeClaude
Guide2026-05-05

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

Learn how to enable and optimize Claude's extended thinking for complex reasoning tasks. Covers adaptive thinking, effort parameters, manual mode, and practical API examples.

Quick Answer

This guide explains how to use Claude's extended thinking feature to enhance reasoning on complex tasks. You'll learn about adaptive thinking (recommended for Claude Opus 4.7+), manual mode (deprecated but still functional on older models), and how to configure effort, budget tokens, and display options for optimal results.

Extended ThinkingClaude APIAdaptive ThinkingReasoningToken Budget

Introduction

Claude's extended thinking capability is a game-changer for complex reasoning tasks. It allows Claude to "think step by step" before delivering a final answer, producing internal reasoning blocks that you can inspect or summarize. This guide covers everything you need to know to use extended thinking effectively, from the latest adaptive thinking mode to legacy manual configurations.

How Extended Thinking Works

When extended thinking is enabled, Claude generates special thinking content blocks in its response. These blocks contain the model's internal reasoning process, followed by the final text content block. 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 signature field is used for verification and is required when streaming responses.

Adaptive Thinking (Recommended for Claude Opus 4.7+)

For Claude Opus 4.7 and later models, manual extended thinking (thinking: {type: "enabled", budget_tokens: N}) is no longer supported and returns a 400 error. Instead, you must use adaptive thinking with the effort parameter.

What is Adaptive Thinking?

Adaptive thinking lets Claude dynamically decide how much thinking is needed based on the complexity of the task. You control the effort level, not a fixed token budget. This is more efficient and produces better results.

Effort Parameter

The effort parameter accepts three values:

  • low: Minimal thinking, suitable for simple tasks.
  • medium: Balanced thinking for most tasks.
  • high: Maximum reasoning for complex problems.

API Example (Python)

import anthropic

client = anthropic.Anthropic()

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

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: 4096, thinking: { type: 'adaptive', effort: 'high' }, messages: [ { role: 'user', content: 'Solve this complex math problem: integrate x^2 * sin(x) dx' } ] });

console.log(response.content);

Manual Extended Thinking (Deprecated but Still Functional)

For Claude Opus 4.6 and Claude Sonnet 4.6, adaptive thinking is recommended, but manual mode (type: "enabled") is still functional. However, it is deprecated and will be removed in a future release.

How Manual Mode Works

In manual mode, you specify a budget_tokens value that sets the maximum number of tokens Claude can use for thinking. The actual thinking tokens may be less than the budget.

API Example (Python)

import anthropic

client = anthropic.Anthropic()

response = client.messages.create( model="claude-opus-4-6", max_tokens=4096, thinking={ "type": "enabled", "budget_tokens": 2048 }, messages=[ {"role": "user", "content": "Explain quantum entanglement in simple terms"} ] )

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-6', max_tokens: 4096, thinking: { type: 'enabled', budget_tokens: 2048 }, messages: [ { role: 'user', content: 'Explain quantum entanglement in simple terms' } ] });

console.log(response.content);

Special Model Behaviors

Different Claude models handle extended thinking differently:

ModelRecommended ModeNotes
Claude Opus 4.7+Adaptive (type: "adaptive")Manual mode returns 400 error
Claude Mythos PreviewAdaptive (default)Also accepts manual mode; type: "disabled" not supported; use display: "summarized" for summaries
Claude Opus 4.6Adaptive (recommended)Manual mode deprecated but functional
Claude Sonnet 4.6Adaptive (recommended)Manual mode deprecated but functional; interleaved mode available

Streaming with Extended Thinking

When streaming responses with extended thinking, you must handle thinking and text delta events separately. Here's an example:

import anthropic

client = anthropic.Anthropic()

with client.messages.stream( model="claude-opus-4-7", max_tokens=4096, thinking={"type": "adaptive", "effort": "high"}, messages=[ {"role": "user", "content": "Write a poem about AI"} ] ) as stream: for event in stream: if event.type == "thinking_delta": print(f"Thinking: {event.delta}", end="") elif event.type == "text_delta": print(f"Text: {event.delta}", end="")

Best Practices

  • Use adaptive thinking for new models – It's more efficient and future-proof.
  • Set appropriate effort levels – Use low for simple Q&A, high for complex reasoning.
  • Handle streaming correctly – Always check for thinking_delta and text_delta events.
  • Respect token budgets – Even in adaptive mode, max_tokens limits total output.
  • Verify signatures – When security matters, verify the signature field to ensure thinking integrity.

Troubleshooting

  • 400 error with type: "enabled" – You're using a model that requires adaptive thinking. Switch to type: "adaptive".
  • No thinking content returned – Check if your model supports extended thinking and that you've enabled it correctly.
  • Streaming issues – Ensure you're handling both thinking_delta and text_delta events.

Key Takeaways

  • Adaptive thinking (type: "adaptive" with effort parameter) is the recommended mode for Claude Opus 4.7+ and should be used for all new projects.
  • Manual extended thinking (type: "enabled" with budget_tokens) is deprecated on Claude Opus 4.6 and Sonnet 4.6, and returns an error on Opus 4.7+.
  • Effort levels (low, medium, high) let you control how much reasoning Claude applies, making adaptive thinking more flexible than fixed budgets.
  • Streaming requires handling separate thinking_delta and text_delta events to capture the full reasoning process.
  • Model compatibility varies – always check the documentation for your specific model version.