Claude Code에 `Ultrathink` 를 사용하면 더 똑똑해짐 | GeekNews
Blog

Claude Code에 `Ultrathink` 를 사용하면 더 똑똑해짐 | GeekNews

xguru
2025.07.06
·News·by Anonymous
#LLM#Claude#Agent#CLI#Prompt Engineering

Key Points

  • 1A recent discovery shows that Anthropic's Claude Code CLI agent can be prompted with keywords like "think" and "ultrathink" to allocate more computational resources, specifically tokens, for deeper problem-solving.
  • 2These keywords directly control the token budget: "think" provides 4,000 tokens, "megathink" grants 10,000 tokens, and "ultrathink" allows up to 31,999 tokens for extended processing.
  • 3This feature is implemented within Claude Code's internal JavaScript, rather than being a native Claude model capability, enhancing its utility as an agent-like coding tool for complex tasks.

Anthropic's Claude Code, a Command Line Interface (CLI) agent tool powered by the Claude large language model, incorporates a mechanism to dynamically allocate varying levels of computational resources for problem-solving based on specific keyword prompts. This functionality allows users to induce deeper reasoning by controlling the token budget allocated for Claude's internal thought processes.

The core methodology revolves around a set of predefined keywords that map to distinct token allocation ceilings, effectively serving as "thinking budgets" for the AI agent. These mappings, discovered through analysis of Claude Code's internal JavaScript source code (despite it not being open-source, its client-side nature allowed for inspection using tools like prettier for code readability and ripgrep for keyword searching), are as follows:

  • "think": Allocates up to 4,000 tokens for internal reasoning.
  • "think hard", "think more", "megathink": Allocates up to 10,000 tokens for internal reasoning.
  • "ultrathink", "think very hard", "think super hard": Allocates the maximum observed budget of 31,999 tokens for internal reasoning.

This mechanism enables the Claude Code agent to engage in more extensive and complex internal deliberation before formulating a response or executing a task. When these keywords are invoked, the agent is granted a larger "thought space" or "scratchpad" to process information, strategize, and refine its approach, which is particularly beneficial for multi-step, intricate coding challenges, problem decomposition, and nuanced analysis.

It is crucial to note that this keyword-driven token allocation is a feature embedded within the Claude Code CLI tool itself, rather than an intrinsic, direct interface of the underlying Claude LLM. While Claude models do possess general "Extended Thinking" capabilities, this specific keyword-based budget amplification is implemented client-side within the agent's operational logic.

The practical utility of this feature lies in transforming Claude into a more robust agent-based development tool, capable of delivering more accurate, comprehensive, and refined outputs for tasks such as code generation, debugging, and architectural design. By simply integrating these keywords into prompts, developers can intuitively scale the cognitive effort Claude applies to a given problem. This functionality has been corroborated by Anthropic's own documentation on Claude Code best practices, which advises using "think" to activate an extended thought mode, with SDK examples also showing similar budget_tokens values. However, discussions within the developer community also highlight a desire for more explicit, numerical control over these reasoning budgets rather than relying on abstract keyword "spells," suggesting that future iterations might benefit from more transparent UI elements for resource management.