CLAUDE LABJP
PRICING — September 1 was the scheduled date for the Sonnet 5 price increase, and it did not happen. The introductory $2/$10 per MTok now stands as the regular pricePARTNER — Salesforce and Anthropic announced Claudeforce, an expanded partnership. The Salesforce in Claude plugin ships with 37 prebuilt sales skills, from meeting prep to pipeline managementTRUST — Claudeforce serves Claude through Amazon Bedrock inside the Salesforce Trust Boundary, so data and inference never leave the security perimeter — an answer aimed squarely at regulated industriesBETA — Salesforce in Claude is with select pilot customers for now, with an open beta expected during SeptemberLIMITS — The 50% weekly-limit boost runs through September 13. From September 14 the permanent level is 25% above the pre-promotion baseline, roughly a 17% cut from todayRELEASE — Claude Code has shipped nothing since v2.1.251 on August 28. Against a pace of one release every 0.8 days, a four-day gap is among the longest yetPRICING — September 1 was the scheduled date for the Sonnet 5 price increase, and it did not happen. The introductory $2/$10 per MTok now stands as the regular pricePARTNER — Salesforce and Anthropic announced Claudeforce, an expanded partnership. The Salesforce in Claude plugin ships with 37 prebuilt sales skills, from meeting prep to pipeline managementTRUST — Claudeforce serves Claude through Amazon Bedrock inside the Salesforce Trust Boundary, so data and inference never leave the security perimeter — an answer aimed squarely at regulated industriesBETA — Salesforce in Claude is with select pilot customers for now, with an open beta expected during SeptemberLIMITS — The 50% weekly-limit boost runs through September 13. From September 14 the permanent level is 25% above the pre-promotion baseline, roughly a 17% cut from todayRELEASE — Claude Code has shipped nothing since v2.1.251 on August 28. Against a pace of one release every 0.8 days, a four-day gap is among the longest yet
Articles/Claude Code
Claude Code/2026-05-05Advanced

Using Extended Thinking with Claude Code in 2026: A

A practical guide to using Claude 4's Extended Thinking feature with the Claude Code CLI and API. Learn how to set thinking budgets, handle streaming, and use it where it actually helps in production.

Extended Thinking3Claude Code243Claude 4API28reasoning3

Understanding why an AI reached a conclusion changes how much you trust it.

Extended Thinking, introduced with Claude 4, surfaces the model's internal reasoning process as part of the response. Before diving into "how to enable it," it's worth understanding when it actually helps — because using it indiscriminately adds cost without proportional benefit.

What Extended Thinking Changes

A standard Claude API response returns only the final answer. With Extended Thinking enabled, the response includes a thinking block before the text — the model's reasoning trace as it worked toward its conclusion.

This isn't cosmetic. The act of explicit reasoning genuinely improves performance on complex tasks: mathematical problems, multi-criteria code reviews, conflicting requirements analysis. The model does better work when it can think before it answers.

The tradeoff is tokens. The budget_tokens setting controls how much the model can think, and that directly affects cost. Thoughtful budget configuration is as important as the feature itself.

Basic Implementation

import anthropic
 
client = anthropic.Anthropic()
 
response = client.messages.create(
    model="claude-opus-4-6",  # Available on Opus 4 and Sonnet 4
    max_tokens=16000,
    thinking={
        "type": "enabled",
        "budget_tokens": 10000  # Max tokens the model can spend on reasoning
    },
    messages=[{
        "role": "user",
        "content": "Identify all security vulnerabilities in this code:\n\n```python\ndef authenticate(username, password):\n    query = f'SELECT * FROM users WHERE name={username} AND pass={password}'\n    return db.execute(query)\n```"
    }]
)
 
# Separate thinking from text blocks
for block in response.content:
    if block.type == "thinking":
        print("=== Reasoning Process ===")
        print(block.thinking)
        print()
    elif block.type == "text":
        print("=== Response ===")
        print(block.text)

Keep budget_tokens within max_tokens. In this example, max_tokens=16000 with budget_tokens=10000 allocates up to 10K tokens for thinking and 6K for the actual response.

Streaming Extended Thinking

For tasks where the thinking phase is long, streaming lets you surface the reasoning process in real time.

import anthropic
 
client = anthropic.Anthropic()
 
with client.messages.stream(
    model="claude-sonnet-4-6",
    max_tokens=8000,
    thinking={
        "type": "enabled",
        "budget_tokens": 5000
    },
    messages=[{
        "role": "user",
        "content": "Design an optimal database schema for these requirements: [details]"
    }]
) as stream:
    current_block_type = None
    
    for event in stream:
        if hasattr(event, 'type') and event.type == 'content_block_start':
            if hasattr(event.content_block, 'type'):
                current_block_type = event.content_block.type
                if current_block_type == 'thinking':
                    print("\n[Thinking...]", flush=True)
                elif current_block_type == 'text':
                    print("\n[Response]", flush=True)
        
        elif hasattr(event, 'type') and event.type == 'content_block_delta':
            if hasattr(event.delta, 'thinking'):
                print(event.delta.thinking, end='', flush=True)
            elif hasattr(event.delta, 'text'):
                print(event.delta.text, end='', flush=True)

Streaming the thinking block makes a useful UX pattern: showing users that "Claude is working through this" reduces abandonment on slow tasks and sets appropriate expectations.

Setting budget_tokens Appropriately

More tokens doesn't automatically mean better answers. Match the budget to task complexity:

  • 1,000–3,000 tokens: Simple clarifications, short code fixes
  • 5,000–10,000 tokens: Mid-complexity design decisions, requirements organization
  • 15,000–30,000 tokens: Large system architecture, complex mathematical proofs

Setting an excessively high budget doesn't cause the model to think more than needed — it will use what the problem requires. But it does raise the ceiling on potential cost, so keep budgets proportional to the task.

Where Extended Thinking Earns Its Cost in Production

Pre-release code review

When the question is "should we ship this?" — not just finding bugs but evaluating design decisions, extensibility concerns, and hidden assumptions — Extended Thinking produces substantially richer reasoning. Reading the thinking block often surfaces issues the final answer only mentions in passing.

Competing requirements reconciliation

When stakeholders have conflicting needs, Extended Thinking makes the model's trade-off reasoning visible. That transparency can shorten team debates about which path to take.

Algorithm selection

"Which approach fits this constraint set?" benefits from visible reasoning. Seeing why the model rejected alternatives is often more valuable than the recommendation itself.

For related context on model selection and cost management with Claude Code, see the model selection strategy guide and the token usage optimization guide.

One Important Constraint: Thinking Blocks and Caching

As of 2026, thinking block content is not eligible for prompt caching. Passing thinking blocks across multiple turns in a conversation is technically possible, but caching won't apply, so costs scale up quickly.

The practical implication: Extended Thinking works best on single-turn, self-contained tasks. For conversational workflows, use standard mode and reserve Extended Thinking for the moments where reasoning visibility genuinely matters.

A Good First Experiment

Take the most complex code review in your current codebase and run it through Opus 4 with Extended Thinking enabled. Read the thinking block, not just the response. The reasoning trace alone — seeing how the model weighed different concerns — tends to surface a different kind of insight than the final answer. That's where the value of this feature becomes concrete.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $15 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Claude Code2026-04-24
Claude Code Environment Variables — The Complete Practical Reference
A practitioner-focused reference for every Claude Code environment variable that actually matters. Covers API connectivity, model selection, PowerShell tool quirks, logging, timeouts, security flags, and real-world templates for solo, team, and CI/CD setups.
Claude Code2026-09-01
Drop the quotes on a heredoc and the prices in your log quietly change
An unquoted heredoc runs the variables and backticks inside its body. Here are the four ways my log got rewritten, how the three quoting forms compare, a safe placeholder-and-sed pattern, and a small script for auditing what you already have.
Claude Code2026-09-01
Once I passed a dozen MCP servers, I stopped trusting the startup list
Only some of the servers that say connection failed at startup are ones you can actually fix. Here is a probe that separates no-response, launch failure, and protocol rejection, measured across a 14-server fleet where sequential 22.03s became parallel 5.09s, and where trimming the deadline quietly turned healthy servers into failures.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →