Extended Thinking for Hard Problems

Harry · 15 Oct 2026 · 3 views
Log in to track your progress and mark lessons complete.

When to Use It

Architecture decisions, tricky debugging, math-heavy tasks and anything where the first answer is usually wrong. Extended thinking buys reasoning effort where it pays off.

Practical Setup

response = client.messages.create(
    model="claude-sonnet-4-5-20250929",
    max_tokens=16000,
    thinking={"type": "enabled", "budget_tokens": 10000},
    messages=[{"role": "user", "content": problem}]
)

Tips

Set the thinking budget to roughly half of max tokens. Ask Claude to show alternatives it considered, not just the winner. For routine tasks leave thinking off: it costs time and money per token.

Share this post:
AI caption:

Comments (0)

Please login or register to comment.
FREE FOREVER • NO CREDIT CARD

Learn faster with your free account

Join GroovyGrails and unlock everything a guest can't do.

🎓
Earn certificates
Pass quizzes and download verified PDF certificates.
📊
Track your progress
Resume tutorials where you left off, from your dashboard.
🔖
Bookmark & comment
Save tutorials for later and join the discussion.
🚀
Training & updates
Request live training and get new-lesson alerts.
📚 100+ tutorials📝 1000+ lessons💚 100% free
or continue with your account below

🙋 Register Free

Takes 30 seconds. You've enjoyed 3 free tutorials!

Already have an account?