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
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 events4
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 containContentBlock[] 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
- Good candidates
- Skip extended thinking
- Complex coding tasks (debugging, architecture decisions)
- Multi-step reasoning problems
- Tasks requiring careful analysis before action
Budget tuning
ThebudgetTokens value controls how much reasoning the model can do. Higher budgets allow deeper thinking but increase latency and cost.