BeClaude
GuideBeginnerAgents2026-05-20

Mastering Adaptive Thinking in Claude: Smarter Reasoning Without Manual Budgets

Learn how to use Claude's adaptive thinking mode to dynamically allocate reasoning effort, improve agentic workflows, and simplify API integration.

Quick Answer

This guide explains how to use adaptive thinking with Claude Opus 4.7, Sonnet 4.6, and Mythos Preview. You'll learn to replace manual token budgets with dynamic reasoning, use the effort parameter for cost control, and optimize agentic workflows with interleaved thinking.

adaptive thinkingextended thinkingClaude APIagentic workflowseffort parameter

Introduction

Claude's extended thinking capability has been a game-changer for complex reasoning tasks, but manually setting a budget_tokens value often felt like guesswork. Too low, and Claude couldn't fully reason through a problem. Too high, and you wasted tokens on simple queries.

With adaptive thinking, Claude now decides for itself when and how much to think. This feature, available on Claude Opus 4.7, Opus 4.6, Sonnet 4.6, and the new Mythos Preview model, dynamically allocates reasoning effort based on the complexity of each request. The result? Better performance, simpler code, and more efficient token usage.

In this guide, you'll learn:

  • What adaptive thinking is and how it differs from manual extended thinking
  • How to implement it in your API calls (with code examples)
  • How to use the effort parameter to control thinking depth
  • Best practices for agentic workflows and bimodal tasks

What Is Adaptive Thinking?

Adaptive thinking is the recommended way to use extended thinking with supported Claude models. Instead of you setting a fixed token budget, Claude evaluates each request and decides:

  • Whether to use extended thinking at all
  • How much thinking is appropriate
At the default effort level (high), Claude almost always thinks. At lower effort levels, it may skip thinking for simpler problems, saving tokens and latency.

Key Benefits

  • No more manual budgets: Eliminate the guesswork of setting budget_tokens.
  • Interleaved thinking: Claude can think between tool calls, making it ideal for agentic workflows.
  • Better performance: Especially for bimodal tasks (mixing simple and complex queries) and long-horizon agents.
  • Simpler code: One parameter replaces the old type: "enabled" + budget_tokens combination.

Supported Models

ModelAdaptive Thinking SupportNotes
Claude Mythos PreviewDefault (auto-applies)Cannot disable thinking
Claude Opus 4.7Only supported modeManual thinking rejected with 400 error
Claude Opus 4.6SupportedManual thinking deprecated
Claude Sonnet 4.6SupportedManual thinking deprecated
Warning: On Opus 4.6 and Sonnet 4.6, thinking.type: "enabled" with budget_tokens is deprecated and will be removed in a future release. Migrate to adaptive thinking now.

How to Use Adaptive Thinking

Basic Implementation

To use adaptive thinking, set thinking.type to "adaptive" in your API request. Here's a Python example:

import anthropic

client = anthropic.Anthropic()

response = client.messages.create( model="claude-opus-4-7", max_tokens=16000, thinking={"type": "adaptive"}, messages=[ { "role": "user", "content": "Explain why the sum of two even numbers is always even." } ] )

for block in response.content: if block.type == "thinking": print(f"\nThinking: {block.thinking}") elif block.type == "text": print(f"\nResponse: {block.text}")

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' }, messages: [ { role: 'user', content: 'Explain why the sum of two even numbers is always even.' } ] });

for (const block of response.content) { if (block.type === 'thinking') { console.log(\nThinking: ${block.thinking}); } else if (block.type === 'text') { console.log(\nResponse: ${block.text}); } }

Controlling Thinking Depth with the Effort Parameter

Adaptive thinking includes an optional effort parameter that acts as a soft guide for how much thinking Claude should do. This is useful when you want to balance reasoning depth against cost and latency.

Effort Levels

LevelBehaviorUse Case
lowMinimal thinking; may skip for simple queriesHigh-throughput, low-cost scenarios
mediumBalanced thinkingGeneral-purpose use
high (default)Almost always thinks deeplyComplex reasoning, agentic tasks

Example with Effort

response = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=16000,
    thinking={
        "type": "adaptive",
        "effort": "medium"  # or "low", "high"
    },
    messages=[
        {
            "role": "user",
            "content": "Design a sorting algorithm that works in O(n log n) time."
        }
    ]
)
Note: The effort parameter is a soft guide, not a hard limit. Claude may still think deeply for genuinely complex problems even at low effort.

Adaptive Thinking for Agentic Workflows

One of the most powerful features of adaptive thinking is interleaved thinking—Claude can think between tool calls. This is critical for agentic workflows where the model needs to reason about tool results before deciding the next action.

Example: Multi-Step Tool Use

response = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=32000,
    thinking={"type": "adaptive"},
    tools=[
        {
            "name": "search_database",
            "description": "Search a database for user information",
            "input_schema": {
                "type": "object",
                "properties": {
                    "query": {"type": "string"}
                },
                "required": ["query"]
            }
        },
        {
            "name": "calculate",
            "description": "Perform a mathematical calculation",
            "input_schema": {
                "type": "object",
                "properties": {
                    "expression": {"type": "string"}
                },
                "required": ["expression"]
            }
        }
    ],
    messages=[
        {
            "role": "user",
            "content": "Find the user with ID 12345 and calculate their average order value from the last 30 days."
        }
    ]
)

With adaptive thinking, Claude can:

  • Think about how to approach the task
  • Call search_database to get user data
  • Think about the results
  • Call calculate to compute the average
  • Think about the final answer
  • Return the response
This interleaved thinking makes agents more reliable and capable of handling complex, multi-step tasks.

Migrating from Manual Extended Thinking

If you're currently using thinking.type: "enabled" with budget_tokens, here's how to migrate:

Before (Deprecated)

thinking={
    "type": "enabled",
    "budget_tokens": 8000
}

After (Recommended)

thinking={
    "type": "adaptive"
}

Or with effort control:

thinking={
    "type": "adaptive",
    "effort": "high"
}

Migration Checklist

  • Update your model: Ensure you're using a supported model (Opus 4.6+, Sonnet 4.6+, or Mythos Preview).
  • Remove budget_tokens: This parameter is ignored (or rejected) with adaptive thinking.
  • Test with effort: Start with the default high effort, then experiment with medium or low for cost savings.
  • Monitor token usage: Adaptive thinking may use more or fewer tokens than your old budget, depending on task complexity.
  • Update error handling: On Opus 4.7, using type: "enabled" will return a 400 error.

Best Practices

1. Start with Default Effort

For most use cases, the default high effort works well. Only lower the effort if you're confident the tasks are simple or you need to reduce costs.

2. Use Adaptive Thinking for Agents

If you're building agentic workflows with tool use, adaptive thinking is a must. The interleaved thinking capability dramatically improves reasoning quality.

3. Combine with Prompt Caching

Adaptive thinking works well with prompt caching. Cache your system prompts and tool definitions to reduce latency and costs.

4. Handle Thinking Blocks in Streaming

When streaming responses, thinking blocks appear as separate content blocks. Make sure your streaming handler can process both thinking and text blocks.

5. Test with Bimodal Workloads

Adaptive thinking shines when your workload mixes simple and complex queries. Test it with your actual traffic patterns to see the benefits.

Troubleshooting

"thinking.type must be 'adaptive'" Error

If you're using Claude Opus 4.7 and get this error, you're sending thinking.type: "enabled". Change it to "adaptive".

Thinking Not Appearing

On Mythos Preview, thinking is always enabled. On other models, ensure you've set thinking.type: "adaptive" and the model supports it.

High Token Usage

If adaptive thinking uses more tokens than expected, try lowering the effort parameter to medium or low.

Conclusion

Adaptive thinking represents a major step forward in how Claude handles reasoning. By letting the model decide when and how much to think, you get better performance with less configuration overhead. Whether you're building a simple Q&A bot or a complex multi-step agent, adaptive thinking simplifies your code and improves results.

Key Takeaways

  • Adaptive thinking replaces manual token budgets on Claude Opus 4.7, Opus 4.6, Sonnet 4.6, and Mythos Preview, letting Claude dynamically allocate reasoning effort.
  • Use the effort parameter (low, medium, high) to guide thinking depth without hard-coding token limits.
  • Interleaved thinking enables better agents by allowing Claude to reason between tool calls, improving multi-step task performance.
  • Migrate now from deprecated budget_tokens to avoid errors on newer models and unlock better performance.
  • Start with default high effort for complex tasks, then experiment with lower levels for cost optimization on simpler workloads.