Calibrating Extended Thinking Budgets — Claude Advanced Reasoning
[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
Calibrating Extended Thinking Budgets
Calibrating Reasoning Depth in Production: Effort Tiers
While retired Claude 3.7 Sonnet required manual budget_tokens tuning (which wasted tokens on trivial queries and invalidated prompt caches whenever changed), Claude 5.x (Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5) standardizes on thinking: { type: "adaptive" } paired with output_config.effort.
Recommended Effort Calibration Tiers (Claude 5.x)
| Effort Level | API Setting | Use Cases | Latency / Token Profile |
|---|---|---|---|
| Low | effort: "low" | Classification, routing, quick formatting, simple Q&A | Fastest (~1-3s, minimal thinking) |
| Medium | effort: "medium" | Everyday coding, PR reviews, SQL generation (Opus 5.5 & Haiku 5.5 default) | Balanced (~3-10s) |
| High | effort: "high" | Multi-file refactors, concurrency debugging (Fable 5.1 & Sonnet 5.5 default) | Thorough (~8-25s) |
| Max | effort: "max" | Formal theorem proving, deep security verification, multi-hour agent architecture | Maximum depth (~20-60s+) |
Critical Production Constraints
- Dynamic Early Termination: Claude ceases thinking the moment it resolves the problem; you are only billed (at standard output rates) for actual thinking tokens generated.
- Why
budget_tokensFails on 5.x: Passing legacybudget_tokensto Claude 4.7 or 5.5 models returns anHTTP 400error. - Allocating
max_tokensHeadroom: Becausemax_tokens(up to 128K on 5.x) caps combined thinking + visible output tokens, hittingmax_tokensmid-thought returnsstop_reason: "max_tokens"without a final answer. Always allocate generousmax_tokensheadroom (e.g.,16000–64000)!
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
// Steer adaptive reasoning depth via output_config.effort
const response = await client.messages.create({
model: "claude-opus-5-5",
max_tokens: 32000,
thinking: { type: "adaptive" },
output_config: { effort: "high" },
messages: [
{ role: "user", content: "Verify whether this lock-free queue is ABA-safe under C++ memory_order_acquire/release." }
]
});
const thinkingBlock = response.content.find(b => b.type === "thinking");
const textBlock = response.content.find(b => b.type === "text");
console.log("Stop Reason:", response.stop_reason); // "end_turn" indicates complete solution
console.log("Output Tokens (includes thinking):", response.usage.output_tokens);
console.log("Final Answer:", textBlock?.text);⌨ HANDS-ON LABCalibrate Reasoning Effort for Complex Logic
⭐ +200 XPOn Claude 5.5, manual budget_tokens is replaced by adaptive thinking and coarse-grained effort levels. Solve a constraint-satisfaction puzzle using high effort on claude-opus-5-5.
1Call Claude Opus 5.5 with adaptive thinking and output_config effort set to high.
OBJECTIVE 1 / 1 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 4
How does Claude determine how many thinking tokens to generate under adaptive thinking?
It always consumes all 128,000 max_tokens
The model dynamically calibrates thinking depth to prompt complexity and stops early as soon as the problem is solved
It always consumes exactly 50% of max_tokens
It depends on network ping