Extended Thinking

Extended thinking in manual mode gives direct control over how much Claude thinks.

Verified

Definition

In manual mode, a thinking token budget is set on each request, and Claude thinks against that budget before it starts its final answer. Extended thinking, which uses the enabled thinking type with a token budget, is deprecated. Claude 4.7 or later models do not support it and reject requests that use it, returning a 400 error.

Adaptive thinking is a thinking mode in which Claude decides, for each request, whether to think and how much. Manual mode remains useful when a workload requires predictable latency or precise control over thinking costs.

At a glance

Interleaved thinking lets Claude think between tool calls within a single assistant turn, reasoning about each tool result before determining what to do next. In manual mode, interleaved thinking is only supported for tools used through the Messages API.

  • On Claude Opus 4.5, Claude Sonnet 4.5 (deprecated), and earlier Claude 4 models, the interleaved thinking beta header is added to the API request.
  • Manual mode on Claude Opus 4.6 has no interleaved thinking.
  • Claude Haiku 4.5 does not support interleaved thinking.
  • Claude Opus 4.5 and models numbered at least 4.6 keep the thinking blocks of prior turns in context and bill them as input.
  • On Claude 4.5 models, Managed Agents turns on manual thinking itself with a fixed budget that cannot be changed.
  • On newer models, Managed Agents uses adaptive thinking.
  • On Claude Opus 4.6 and Claude Sonnet 4.6, the token budget is deprecated.
  • The mapping to adaptive thinking is small: remove the token budget, set the adaptive type, and control reasoning depth with the effort setting instead of a token budget.

The source does not state the order of these points, so they are listed without arrows.

How it works

To turn on manual extended thinking, a thinking object is added with its type set to enabled and a budget_tokens value. The budget_tokens parameter sets a target for how many tokens Claude can use for its internal reasoning process. Larger budgets can improve response quality by allowing more thorough analysis for complex problems.

The budget has a minimum of 1,024 tokens, and the API rejects smaller values. Thinking tokens count toward the max_tokens limit for the turn, so the budget must leave room for the final response. The one exception is interleaved thinking in manual mode, where budget_tokens can exceed max_tokens because the budget spans all thinking blocks within one assistant turn.

Extended thinking cannot be combined with cache pre-warming, which uses a max_tokens of 0. The budget is a target rather than a strict cap. max_tokens remains the hard ceiling on total output.

Claude might stop reasoning well before the budget is exhausted.

Example

There is an example of using extended thinking in the Messages API. In manual mode, changing the token budget between requests invalidates cache breakpoints, just as switching thinking modes does, because the budget value is rendered into the prompt. Running a multi-turn conversation with message-level caching on Claude Sonnet 4.6 and changing the budget on the third request from 4,000 to 8,000 tokens shows the invalidation directly.

In that example, the third request re-creates the cache because the budget changed between requests. A thinking-token field in the response reports how many of the billed output tokens were internal reasoning. In manual mode, the final assistant turn of a thinking-enabled request must start with a thinking block, and adaptive thinking drops that requirement.

Higher budgets allow more comprehensive reasoning, with diminishing returns that depend on the task and at the cost of increased latency.

Sources

This page is written from the official sources below. Open them to check the original text.

Verified ·

This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.