Mauricio Acosta

Unlocking Claude Code's Hidden Thinking Levels: From 'Think' to 'Ultrathink'

Jul 26, 2025|
AI DevelopmentBest PracticesDebugging

What if I told you that saying "ultrathink" to Claude Code isn't just a quirky way to ask for better results—it's actually a hard-coded feature that unlocks maximum computational thinking budget?

When I first learned about Claude Code's thinking levels during an Anthropic training course, I thought it sounded too good to be true. Phrases like "think harder" and "ultrathink" seemed more like developer humor than actual features. But after digging deeper and finding technical verification through a Hacker News thread, I discovered that these aren't just magical incantations—they're real system commands that fundamentally change how Claude Code approaches your problems.

This discovery has transformed how I use Claude Code for complex development tasks, and I want to share these insights to help you get the absolute best performance out of this powerful AI coding assistant.

The Discovery Journey: From Course to Confirmation

My journey into Claude Code's thinking levels began with Anthropic's Claude Code in Action course. During the session, the instructor mentioned something that caught my attention: apparently, you could influence Claude Code's "thinking budget" by using specific phrases in your prompts.

The concept seemed almost magical—that words like "think hard" or "ultrathink" could actually make Claude Code allocate more computational resources to solving your problem. My initial reaction was skepticism. It sounded like one of those development myths that gets passed around but has no real foundation.

But then I did what any curious developer would do: I went down the rabbit hole.

The Hacker News Revelation

A quick Google search led me to a fascinating Hacker News discussion that completely changed my perspective. In this thread, a developer had actually done some light reverse engineering of Claude Code and discovered something remarkable:

"Ultrathink" is hard-coded into the system.

According to the discussion, when Claude Code detects the exact string "ultrathink," it sets the thinking token budget to 31,999 tokens. This isn't some emergent behavior or neural network quirk—it's an intentional feature built directly into the client-side code.

Sharing the Discovery

When I shared this finding with my team, I framed it exactly as it felt: "This sounds like a joke, but apparently it's not." The progression of thinking levels—from "think" to "think hard" to "think harder" to "ultrathink"—each maps to progressively larger computational budgets that Claude Code can use to work through complex problems.

The technical reality behind these "magic words" is that they're precise instructions to the system about how much computational thinking time to allocate to your request. It's not mystical—it's methodical.

The Four Thinking Levels Explained

Based on research from both Anthropic's documentation and community findings, Claude Code recognizes four distinct thinking levels. Each level represents a progressively larger allocation of computational "thinking budget"—essentially, more processing time and resources dedicated to analyzing your problem before responding.

1. "think" - Basic Thinking Level

The entry-level thinking budget. When you include "think" in your prompt, Claude Code allocates a baseline amount of computational resources to consider your request. This is suitable for:

  • Simple code explanations
  • Straightforward debugging tasks
  • Basic implementation requests

Example usage: "Think about how to implement a simple toggle component in React."

2. "think hard" - Moderate Thinking Budget

A step up from the basic level, "think hard" signals Claude Code to dedicate more processing time to your request. This level is ideal for:

  • Code refactoring challenges
  • Performance optimization problems
  • Complex debugging scenarios

Example usage: "Think hard about optimizing this database query for better performance."

3. "think harder" - Enhanced Thinking Budget

The second-highest thinking level, "think harder" allocates substantial computational resources for complex problems that require deep analysis. Use this for:

  • Architecture decisions
  • Complex algorithm implementations
  • Multi-step refactoring across files

Example usage: "Think harder about the best architecture pattern for this microservices communication problem."

4. "ultrathink" - Maximum Thinking Budget (31,999 tokens)

The ultimate thinking level. According to the technical findings, "ultrathink" is hard-coded to set the thinking token budget to exactly 31,999 tokens—the maximum allocation available. This is reserved for:

  • Extremely complex system design problems
  • Large-scale codebase analysis
  • Multi-faceted problems requiring extensive exploration

Example usage: "Ultrathink how to migrate this entire legacy codebase to a modern architecture."

Technical Reality: Not Neural Magic, But Engineered Features

It's important to understand that these aren't emergent AI behaviors or training artifacts. As discovered through code analysis, these are intentional, hard-coded features in Claude Code's client-side implementation. When the system detects these specific strings, it literally adjusts the computational budget allocated to processing your request.

This means the difference between asking "How do I fix this bug?" versus "Ultrathink how to fix this bug?" isn't just psychological—it's a fundamental change in how much processing power Claude Code dedicates to your problem.

Practical Applications: When to Use Each Level

Understanding the thinking levels is one thing, but knowing when to deploy them strategically can dramatically improve your development workflow. Here are real-world scenarios where each level shines:

Quick Tasks: Default or "think"

For everyday coding tasks, you often don't need to specify a thinking level at all. But when you want Claude Code to be slightly more deliberate, "think" works well for:

// Good for: Simple implementations
"Think about creating a utility function to format dates"

// Good for: Basic troubleshooting  
"Think about why this API call is returning undefined"

Moderate Complexity: "think hard"

When you're dealing with problems that have multiple possible solutions or require considering trade-offs:

// Good for: Performance considerations
"Think hard about optimizing this React component's re-rendering"

// Good for: Code organization
"Think hard about the best way to structure this feature module"

Complex Problems: "think harder"

For architectural decisions, complex debugging, or when you need Claude Code to consider multiple interconnected factors:

// Good for: System design
"Think harder about designing a caching strategy for this API"

// Good for: Complex refactoring
"Think harder about migrating this class-based component to hooks while preserving all functionality"

Maximum Complexity: "ultrathink"

Reserve "ultrathink" for your most challenging problems—those that require extensive analysis, consideration of multiple codebases, or complex system interactions:

// Good for: Large-scale architecture
"Ultrathink the best approach to breaking this monolith into microservices"

// Good for: Complex debugging across systems
"Ultrathink why this distributed system is experiencing these intermittent failures"

// Good for: Comprehensive code reviews
"Ultrathink potential issues and improvements in this entire feature implementation"

Integrating Thinking Levels with Best Practices

While thinking levels are powerful, they work best when combined with Anthropic's documented best practices for Claude Code. According to their engineering blog post, the most effective approach follows a structured workflow:

1. Explore and Read First

Before reaching for "ultrathink," start by understanding your codebase. Use basic thinking levels while exploring:

"Think about the current architecture of this authentication system"

2. Plan Before Implementing

Once you understand the landscape, use higher thinking levels for planning:

"Think harder about the best approach to implement OAuth integration given our current auth structure"

3. Strategic Thinking Level Selection

Match your thinking level to the complexity and importance of the task:

  • Documentation and simple fixes: Default or "think"
  • Feature implementation: "think hard"
  • Architectural changes: "think harder"
  • System-wide refactoring: "ultrathink"

4. Iterate and Course-Correct

Use thinking levels throughout your development process, not just at the beginning:

// Initial planning
"Ultrathink the migration strategy for this legacy system"

// Mid-implementation check
"Think harder about potential issues with this approach"

// Final review
"Think about edge cases we might have missed"

5. Combine with Visual Context

When using higher thinking levels, provide as much context as possible. Screenshots, error logs, and code snippets help the increased thinking budget work more effectively.

The "Thinking Budget" Mindset

Think of thinking levels as allocating computational resources, similar to how you might allocate memory or CPU in your applications. Just as you wouldn't use maximum resources for every operation, you shouldn't use "ultrathink" for every request. Use it strategically when the problem complexity justifies the computational cost.

This approach ensures you're not just getting better responses, but getting the most appropriate level of analysis for each specific challenge you're facing.

Key Takeaways for Better Claude Code Usage

Understanding Claude Code's thinking levels transforms how you approach complex development challenges. Here are the essential points to remember:

1. These Are Real Features, Not Placebo Effects

The thinking levels—"think," "think hard," "think harder," and "ultrathink"—are hard-coded features that actually allocate more computational resources to your requests. This isn't about better prompting psychology; it's about accessing more processing power.

2. Match Complexity to Thinking Level

Use a strategic approach:

  • Simple tasks: Default or "think"
  • Moderate complexity: "think hard"
  • Complex problems: "think harder"
  • System-level challenges: "ultrathink"

3. Don't Overuse "Ultrathink"

While "ultrathink" provides maximum thinking budget (31,999 tokens), save it for truly complex problems. Using appropriate thinking levels for the task at hand will give you better overall results and likely faster responses.

4. Combine with Good Practices

Thinking levels work best when integrated with structured workflows: explore first, plan thoroughly, provide context, and iterate on solutions.

5. Experiment and Observe

Try the same complex problem with different thinking levels and observe the differences. You'll quickly develop an intuition for when each level provides the most value.

The Hidden Lesson: Sometimes the "Jokes" Are Real

What started as seemingly humorous developer commands turned out to be sophisticated engineering features. This discovery reminds us that in the rapidly evolving world of AI tooling, it's worth investigating features that might seem too good to be true—sometimes they're exactly as powerful as they appear.

The next time you're facing a particularly challenging coding problem, don't just ask for help. Think about the level of analysis you need, choose your thinking level accordingly, and give Claude Code the computational budget it needs to truly help you solve complex problems.

Have you experimented with Claude Code's thinking levels? What differences have you noticed in the quality and depth of responses? The AI development community continues to discover new ways to leverage these tools effectively, and sharing experiences helps everyone get better results.

References