## Definition **Extended thinking** is Claude's capability to perform an internal chain-of-thought reasoning pass — bounded by a configurable [[Reasoning Budget]] — before emitting a visible response. The trace is exposed to the user as a "thinking" block. ## Surfaces - **Claude Code CLI** — trigger words `think`, `think hard`, `think harder`, `ultrathink` enable extended thinking with progressively larger budgets. - **Claude API** — the SDK exposes `thinking: { type: "adaptive" }` (Sonnet 4.6, Opus 4.6+) or explicit `budget_tokens` (minimum 1,024). - **Web chat (claude.ai)** — the trigger words *do not* invoke extended thinking; only the CLI and API do. ## API Example ```python response = client.messages.create( model="claude-sonnet-4-6", max_tokens=4096, thinking={"type": "adaptive"}, messages=[...], ) ``` ## Reading the Trace The thinking trace is the cheapest debugging tool you have. Three failure modes it surfaces: 1. *Misunderstood goal.* The prompt is the bug; rewrite the prompt, not the answer. 2. *Wrong option chosen.* Interrupt and steer before the model commits. 3. *Looping or oscillating.* The problem is under-specified; add a constraint that breaks the symmetry. ## Related - [[Reasoning Budget]] - [[Model Selection Strategy]] - [[Specialized Agent]]