Skip to main content

Calibrating Extended Thinking Budgets — Claude Advanced Reasoning

[ ABORT TO HUD ]
SEQ. 1
SEQ. 2

Calibrating Extended Thinking Budgets

🧠 Claude Advanced Reasoning⏱ 12 min⭐ 850 BASE XP⌨ HANDS-ON LAB

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 LevelAPI SettingUse CasesLatency / Token Profile
Loweffort: "low"Classification, routing, quick formatting, simple Q&AFastest (~1-3s, minimal thinking)
Mediumeffort: "medium"Everyday coding, PR reviews, SQL generation (Opus 5.5 & Haiku 5.5 default)Balanced (~3-10s)
Higheffort: "high"Multi-file refactors, concurrency debugging (Fable 5.1 & Sonnet 5.5 default)Thorough (~8-25s)
Maxeffort: "max"Formal theorem proving, deep security verification, multi-hour agent architectureMaximum 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_tokens Fails on 5.x: Passing legacy budget_tokens to Claude 4.7 or 5.5 models returns an HTTP 400 error.
  • Allocating max_tokens Headroom: Because max_tokens (up to 128K on 5.x) caps combined thinking + visible output tokens, hitting max_tokens mid-thought returns stop_reason: "max_tokens" without a final answer. Always allocate generous max_tokens headroom (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 XP

On 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.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
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