Mastering Adaptive Thinking: Claude’s Dynamic Reasoning Mode for Smarter API Calls
Learn how to use Claude's adaptive thinking mode to dynamically allocate reasoning effort, improve agentic workflows, and optimize API performance without manual token budgets.
This guide explains how to use Claude's adaptive thinking mode—a dynamic alternative to fixed token budgets—that lets Claude decide when and how much to reason. You'll learn setup, effort tuning, best practices, and migration tips for Opus 4.7, Sonnet 4.6, and Mythos Preview.
Introduction
Claude’s extended thinking capability has long been a powerful tool for complex reasoning tasks. But until recently, you had to manually set a budget_tokens value—a fixed number of tokens Claude could use for internal reasoning. This worked well for predictable workloads, but it forced you to guess the right budget for every request. Too low, and Claude might not reason enough; too high, and you waste tokens and latency.
Enter adaptive thinking—a smarter, dynamic approach. Instead of a fixed budget, adaptive thinking lets Claude evaluate each request’s complexity and decide whether and how much to think. This results in better performance, especially for bimodal tasks (simple + complex mixed) and long-horizon agentic workflows.
In this guide, you’ll learn:
- What adaptive thinking is and how it differs from manual
budget_tokens - Which models support it
- How to use it in your API calls (with code examples)
- How to tune reasoning effort with the
effortparameter - Best practices and migration tips
What Is Adaptive Thinking?
Adaptive thinking is the recommended way to use extended thinking with Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6. It is also the default mode on Claude Mythos Preview.
Instead of you setting a fixed budget_tokens, Claude dynamically determines:
- Whether to think at all (for trivial requests, it may skip thinking)
- How much to think (more for complex problems, less for simple ones)
Note: On Claude Opus 4.7, adaptive thinking is the only supported thinking mode. Manual thinking: {type: "enabled", budget_tokens: N} is rejected with a 400 error.
Supported Models
| Model | Adaptive Thinking Support | Notes |
|---|---|---|
Claude Mythos Preview (claude-mythos-preview) | Default (auto-applies) | thinking: {type: "disabled"} not supported |
Claude Opus 4.7 (claude-opus-4-7) | Only mode | Manual enabled rejected |
Claude Opus 4.6 (claude-opus-4-6) | Supported | Manual enabled deprecated |
Claude Sonnet 4.6 (claude-sonnet-4-6) | Supported | Manual enabled deprecated |
| Older models (Sonnet 4.5, Opus 4.5, etc.) | Not supported | Must use thinking.type: "enabled" |
How to Use Adaptive Thinking
Using adaptive thinking is straightforward. Set thinking.type to "adaptive" in your API request. No beta header is required.
Basic Example (Python)
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}")
Basic 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: 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});
}
}
Tuning Reasoning Effort
You can combine adaptive thinking with the effort parameter to guide how much thinking Claude should do. The effort level acts as soft guidance—Claude will still adapt, but you can nudge it toward more or less reasoning.
Effort Levels
| Level | Description |
|---|---|
low | Minimal thinking; Claude may skip thinking for many requests. Good for simple, high-throughput tasks. |
medium | Balanced approach; Claude thinks when beneficial but doesn’t over-reason. |
high (default) | Claude almost always thinks, even for simpler problems. Best for complex reasoning. |
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": "What is the capital of France?"
}
]
)
Tip: Useloweffort for high-volume, simple queries (e.g., classification, extraction). Usehigheffort for complex reasoning, multi-step planning, or agentic loops.
Adaptive Thinking in Agentic Workflows
One of the biggest advantages of adaptive thinking is interleaved thinking in tool-use scenarios. When Claude makes multiple tool calls, it can think between each call, improving its reasoning over a sequence of actions.
Example: Multi-Step Tool Use
response = client.messages.create(
model="claude-opus-4-7",
max_tokens=32000,
thinking={"type": "adaptive", "effort": "high"},
tools=[
{
"name": "search_database",
"description": "Search a database for records",
"input_schema": {
"type": "object",
"properties": {
"query": {"type": "string"}
},
"required": ["query"]
}
}
],
messages=[
{
"role": "user",
"content": "Find all customers who purchased in Q1 and calculate their average order value."
}
]
)
With adaptive thinking, Claude might:
- Think about how to structure the search
- Call
search_databasefor Q1 customers - Think about how to calculate the average
- Call
search_databaseagain for order values - Think about edge cases
- Produce the final answer
Migration from Manual budget_tokens
If you’re currently using thinking: {type: "enabled", budget_tokens: N} on Opus 4.6 or Sonnet 4.6, it’s time to migrate. Manual budgets are deprecated and will be removed in a future model release.
Migration Steps
- Change
typefrom"enabled"to"adaptive" - Remove
budget_tokens - Optionally add
effort(start with"high"to match your current behavior) - Test with a representative sample of your workload
Before (Deprecated)
thinking = {
"type": "enabled",
"budget_tokens": 8000
}
After (Recommended)
thinking = {
"type": "adaptive",
"effort": "high"
}
Note: On Opus 4.7, the old format is rejected with a 400 error. You must use thinking: {type: "adaptive"}.
Best Practices
- Start with
effort: "high"– This matches the behavior of a generousbudget_tokensand ensures Claude reasons deeply. - Use
effort: "low"for simple tasks – If your workload is mostly classification, extraction, or short answers, low effort saves tokens and reduces latency. - Monitor token usage – Adaptive thinking can sometimes use more tokens than a fixed budget if the task is unexpectedly complex. Set
max_tokensas a safety limit. - Test with your data – Run A/B comparisons between adaptive and manual budgets on a representative sample to measure quality and cost.
- Combine with tool use – Adaptive thinking shines in agentic workflows. Enable interleaved thinking by using tools alongside adaptive thinking.
- Handle thinking blocks in your response – When streaming, process
thinkingblocks separately fromtextblocks to display or log reasoning.
Limitations and Considerations
- Predictable latency: If you need guaranteed response times, adaptive thinking may vary more than a fixed budget. Consider using
effort: "low"for more predictable behavior. - Cost control: Adaptive thinking can use more tokens than expected for complex requests. Use
max_tokensas a hard limit. - Older models: Sonnet 4.5, Opus 4.5, and earlier do not support adaptive thinking. You must use
thinking.type: "enabled"withbudget_tokens.
Key Takeaways
- Adaptive thinking lets Claude dynamically decide when and how much to reason, replacing manual
budget_tokensfor most use cases. - It is the only supported thinking mode on Claude Opus 4.7 and the default on Claude Mythos Preview.
- Use the
effortparameter (low,medium,high) to guide reasoning depth without fixing a token budget. - Adaptive thinking enables interleaved thinking in agentic workflows, improving multi-step reasoning with tool calls.
- Migrate now if you’re using manual budgets on Opus 4.6 or Sonnet 4.6—the old format is deprecated and will be removed.