Claude Code extended thinking Fable 5 Opus AI reasoning

Claude Code Extended Thinking: Using Fable 5 and Opus for Deep Reasoning Tasks (2026)

The Prompt Shelf ·

Claude Code lets you choose which model handles a task. The default model is fast and handles most coding work well. For architecture decisions, complex debugging, or tasks where getting it right the first time matters more than speed, you can switch to a model with extended thinking.

This guide covers when to use Fable 5 and other high-reasoning models in Claude Code, how to configure it, and what actually changes when extended thinking is active.


Current Claude Model Lineup (2026)

ModelIDBest for
Fable 5claude-fable-5Deepest reasoning; architecture, security audits, complex refactors
Opus 4.8claude-opus-4-8Strong reasoning with faster output (Fast mode)
Sonnet 4.6claude-sonnet-4-6Default; most coding tasks, file edits, test writing
Haiku 4.5claude-haiku-4-5-20251001Simple tasks, high-volume automation

The model you use in Claude Code’s interactive session is set separately from models used in workflows, hooks, or API calls.


Switching Models in Claude Code

Interactive Mode

In a Claude Code session, switch models with:

/model claude-fable-5

Or set it for a session when starting:

claude --model claude-fable-5

To switch back to the default:

/model claude-sonnet-4-6

Fast Mode (Opus 4.8)

Fast mode uses Claude Opus 4.8 with faster output — it’s not a downgrade to a smaller model. Toggle it with:

/fast

Fast mode is useful when you want Opus-level reasoning without the longer wait times.

In Workflows

When spawning agents in Workflow scripts, set model per-agent:

// Use Fable 5 for a complex analysis step
const architecture = await agent(
  'Analyze this codebase and identify the main coupling problems between modules',
  { model: 'claude-fable-5', label: 'architecture-analysis' }
)

// Use Haiku for simple, high-volume tasks
const summaries = await parallel(
  files.map(f => () => agent(`Summarize what ${f} does in one sentence`, {
    model: 'claude-haiku-4-5-20251001',
    label: `summarize:${f}`,
  }))
)

What Extended Thinking Actually Does

Extended thinking lets the model reason through a problem step by step before producing output. The visible effect:

  • The model works through the problem before writing code
  • Longer initial pause before output appears
  • Output tends to catch more edge cases and make fewer assumptions
  • For ambiguous tasks, it’s more likely to ask before acting

Extended thinking is on by default in Fable 5. It’s not a mode you explicitly enable — the model decides how much thinking a task needs based on its complexity.

The thinking is hidden from the main output, but visible in the session if you have verbose logging enabled.


When to Use Fable 5 vs Sonnet 4.6

Use Fable 5 for:

Security audits and vulnerability analysis Complex security reasoning benefits from extended thinking. Sonnet 4.6 catches obvious issues; Fable 5 traces multi-step attack chains.

/model claude-fable-5
Review src/auth/ for privilege escalation and IDOR vulnerabilities. 
Trace the full request path for each endpoint.

Architecture decisions with long-term tradeoffs When the decision will be hard to reverse and requires weighing multiple constraints simultaneously.

/model claude-fable-5
We're extracting the notification system from the monolith into a separate service.
Analyze the data flow, identify all callers, and recommend whether to use events 
or direct API calls — including the failure mode implications of each.

Debugging subtle concurrency or state issues Race conditions, deadlocks, and state corruption require holding a lot of context simultaneously.

Large refactors that touch many files When you need confidence that the refactor is complete and consistent before starting execution.

Complex SQL query optimization Query planning, index selection, and N+1 analysis across multiple joins.

Stick with Sonnet 4.6 for:

  • Routine file edits (updating a config, adding a field to a struct)
  • Writing tests for already-specified behavior
  • Generating boilerplate from a clear template
  • Reading and explaining code you’ll act on yourself
  • Small bug fixes with an obvious cause

The rule: if you’d need to think carefully yourself, use Fable 5.


Configuring Default Model in CLAUDE.md

If you want a project to default to a specific model, add it to your CLAUDE.md:

# CLAUDE.md

## Model Preferences

Default model: claude-sonnet-4-6 (for most tasks)

Switch to claude-fable-5 for:
- Security review of src/auth/ or src/payments/
- Cross-cutting refactors affecting 10+ files
- Database schema changes
- Any task that modifies public API contracts

Switch to claude-haiku-4-5-20251001 for:
- Generating changelog entries from commit messages
- Summarizing test output
- Simple string transformations in bulk

Claude Code won’t switch models automatically based on this text, but it provides context for when you or Cascade should manually switch.


Effort Levels in Workflows

In Workflow scripts, the effort option controls how much reasoning a subagent applies, independent of the model:

EffortWhen to use
'low'Mechanical tasks: summarize, categorize, extract
'medium'Default for most agents
'high'Verification, complex analysis, judgment calls
'xhigh' / 'max'Deep reasoning on the hardest problems
// Quick extraction — low effort is fine
const filenames = await parallel(
  chunks.map(c => () => agent(`List all .ts filenames referenced in:\n${c}`, {
    effort: 'low',
    schema: { type: 'object', properties: { files: { type: 'array', items: { type: 'string' } } }, required: ['files'] },
  }))
)

// Adversarial verification — high effort
const verdict = await agent(
  `Verify that this authentication bypass is real and exploitable: ${finding}`,
  { model: 'claude-fable-5', effort: 'max', schema: VERDICT }
)

Combine model: 'claude-fable-5' with effort: 'max' for the hardest verification tasks. For cost-sensitive workflows, use Haiku with effort: 'low' for the high-volume stages.


Token Cost Implications

Extended thinking and higher-tier models cost more per token. Rough guidance:

  • Haiku 4.5: ~10-20x cheaper than Fable 5 per token
  • Sonnet 4.6: ~3-5x cheaper than Fable 5 per token
  • Fable 5 / Opus 4.8: highest cost, highest reasoning quality

In Claude Code Max (subscription), all models are included and most usage patterns don’t hit limits. For API usage, model selection significantly affects cost.

A reasonable pattern: use Sonnet 4.6 for the 80% of tasks that are routine, Fable 5 for the 20% that are high-stakes or high-complexity.


Using Extended Thinking via the API

If you’re building on the Claude API:

import anthropic

client = anthropic.Anthropic()

# Extended thinking with Fable 5
response = client.messages.create(
    model="claude-fable-5",
    max_tokens=16000,
    thinking={
        "type": "enabled",
        "budget_tokens": 10000,  # tokens reserved for thinking
    },
    messages=[{
        "role": "user",
        "content": "Analyze this code for concurrency issues and suggest fixes:\n\n" + code,
    }],
)

# Thinking blocks appear in content alongside text blocks
for block in response.content:
    if block.type == "thinking":
        # Internal reasoning (useful for debugging)
        print("Thinking:", block.thinking[:200])
    elif block.type == "text":
        print("Response:", block.text)

The budget_tokens parameter controls how many tokens are reserved for the thinking process. Higher budget = deeper reasoning = higher cost.


FAQ

Does Claude Code always use extended thinking with Fable 5? Extended thinking activates based on task complexity — the model decides. Simple tasks use minimal thinking even on Fable 5. You can’t force it on or off in Claude Code interactive mode, but you can influence it by asking the model to “think carefully” or “reason through all the edge cases.”

Can I set a default model for all my Claude Code sessions? Set ANTHROPIC_MODEL in your shell profile:

export ANTHROPIC_MODEL=claude-fable-5

Or use --model each time. There’s no persistent per-project model config built into Claude Code — the CLAUDE.md approach above is a convention, not a built-in feature.

What’s the difference between /fast and switching to Fable 5? /fast toggles Opus 4.8 with faster streaming. Switching to claude-fable-5 uses Fable 5, which has deeper reasoning. For most work, the distinction is: /fast for speed with Opus quality; claude-fable-5 for maximum reasoning depth.

Does extended thinking help with code generation or just analysis? Both, but it’s most impactful for analysis and planning. For generating boilerplate or writing standard patterns, Sonnet 4.6 is sufficient and faster. Extended thinking helps when the “right” solution requires understanding multiple constraints simultaneously.

Can I see the thinking output in Claude Code? Not directly in the normal UI. Extended thinking happens internally. The effect is visible in the output quality, not as visible thought blocks. If you need to inspect thinking, use the API directly with the response format above.


For CLAUDE.md templates that include model-selection guidance and other project configuration patterns, see our gallery — we track 500+ real-world rule files from open-source projects.

Related Articles

Explore the collection

Browse all AI coding rules — CLAUDE.md, .cursorrules, AGENTS.md, and more.

Browse Rules