Skip to main content
Extended thinking lets an agent reason through complex problems before responding. Enable it for agents that need to do more than answer questions — agents that plan, analyze, or solve.

Enabling extended thinking

Enable extended thinking when you deploy or edit an agent in Desktop — set a thinking token budget alongside the agent’s model and max tokens. Behind the scenes, the agent’s saved configuration looks like this:

Configuration

Constraints

  • budgetTokens must be >= 1024
  • budgetTokens must be < maxTokens — the thinking budget is drawn from the total token budget
  • When thinking is enabled, temperature is automatically omitted from the API request (Anthropic’s API requires this)

How it works

1

Request

The agent sends the request with thinking: { type: "enabled", budget_tokens: N }
2

Thinking

Claude generates thinking blocks internally
3

Streaming

Thinking blocks are included in the streamed response as thinking_delta events
4

Response

The final response contains both thinking blocks and the visible text response
5

Persistence

Thinking blocks are preserved in the session for context continuity across rounds

In Desktop

During the thinking phase, a thinking indicator shows the model is reasoning. Once thinking completes, the visible response streams as normal. Thinking blocks can be expanded to see the model’s internal reasoning.

In Telegram

Thinking happens server-side. The user only sees the final text response.

Content blocks

When thinking is enabled, assistant messages contain ContentBlock[] instead of a plain string. The block types include: These blocks are preserved in session JSONL entries so that thinking context carries across multi-turn conversations.

When to use it

  • Complex coding tasks (debugging, architecture decisions)
  • Multi-step reasoning problems
  • Tasks requiring careful analysis before action

Budget tuning

The budgetTokens value controls how much reasoning the model can do. Higher budgets allow deeper thinking but increase latency and cost.
The model may use fewer tokens than the budget — it stops thinking when it has enough context to respond. The budget is a ceiling, not a target.