Claude Opus 4.8 is Anthropic’s most capable coding and agentic model, released on May 28, 2026. It runs in Claude Code using the model string claude-opus-4-8 and delivers meaningful benchmark improvements over Opus 4.7 — especially for long-running, autonomous tasks. This article covers every step from installation to enterprise deployment.
- What Is Claude Opus 4.8?
- How to Set Up Claude Opus 4.8 in Claude Code
- Installing and Updating Claude Code
- Selecting the Opus 4.8 Model
- Configuring the Model in Settings Files
- Understanding Claude Code Model Aliases
- Effort Levels in Claude Code with Opus 4.8
- Available Effort Levels and When to Use Each
- How to Set and Change Effort Level
- Adaptive Reasoning and Extended Thinking
- Extended Context Window with Opus 4.8
- Dynamic Workflows in Claude Code
- Opus 4.8 Capabilities and Benchmark Performance
- Coding and Agentic Benchmark Results
- Knowledge Work and Financial Analysis Performance
- What Production Partners Report
- The Honesty and Alignment Upgrade
- Fast Mode and Cost Management
- Restricting and Managing Model Access (Enterprise)
- Setting an Allowed Model List
- Controlling Subagent and Advisor Models
- Fallback Model Chains and Automatic Fallback
- Deploying Opus 4.8 on Third-Party Providers
- Pinning Models on Bedrock, Vertex AI, and Foundry
- Customizing Model Display and Capabilities
- Overriding Model IDs and Prompt Caching
- Migrating from Opus 4.7 to Opus 4.8
- Practical Workflow Guide for Opus 4.8
- Conclusion
- FAQs
- How do I switch to Claude Opus 4.8 in Claude Code?
- What is the model string for Claude Opus 4.8 in the API?
- What effort level should I use with Opus 4.8 in Claude Code?
- How much does Claude Opus 4.8 cost compared to Opus 4.7?
- What is Dynamic Workflows and how do I enable it in Claude Code?
- What is the difference between the opus alias and claude-opus-4-8 in Claude Code?
- Does Claude Opus 4.8 support a 1 million token context window?
- Will my existing Opus 4.7 prompts and API code break with Opus 4.8?
What Is Claude Opus 4.8?
Opus 4.8 sits at the top of the Claude 4 family. It builds on Opus 4.7 with stronger agentic coding performance, a honesty upgrade, and a new Dynamic Workflows system that lets it run parallel subagents.
On SWE-bench Verified, Opus 4.8 scores higher than its predecessor, and it ships with fast mode — a 2.5x speed boost at roughly double the standard token price. For developers who need quality and can manage cost, it’s the default choice for complex professional work.
Key improvements over Opus 4.7:
- Higher scores on SWE-bench Pro and Terminal-Bench 2.1
- Four times less likely to hide code flaws
- Dynamic Workflows with parallel subagent support
- 1 million token context window (with eligible plans)
How to Set Up Claude Opus 4.8 in Claude Code
Installing and Updating Claude Code
If Claude Code isn’t installed yet, the quickest method is via npm:
npm install -g @anthropic-ai/claude-code
Or with Homebrew on macOS:
brew install claude-code
Once installed, always run the Claude update before switching models. Opus 4.8 requires Claude Code v2.1.154 or later. After updating, launch Claude Code and check the startup header — it should display the current version.
[INTERNAL LINK: Claude Code setup and installation guide]
Selecting the Opus 4.8 Model
The fastest way to switch models mid-session is the /model command:
/model opus
/model claude-opus-4-8
Both work. The opus alias resolves to Opus 4.8 on the Anthropic API. If you’re on Bedrock, Vertex AI, or Foundry, the alias may resolve differently — use the full model name claude-opus-4-8 to be safe.
You can also pass the model at startup:
claude –model claude-opus-4-8
Or set it as an environment variable:
ANTHROPIC_MODEL=claude-opus-4-8
Configuring the Model in Settings Files
For project-level defaults, add the model field to your Claude Code settings file:
{
“model”: “claude-opus-4-8”
}
This applies to all sessions in that project. Managed or policy settings at the Enterprise level can override this. User settings take lower priority than project settings, so project-level config is the most reliable place for a consistent default.
[INTERNAL LINK: Claude Code commands reference]
Understanding Claude Code Model Aliases
Claude Code supports shorthand aliases so you don’t need to type full model strings every time.
| Alias | Resolves To |
| default | Current recommended model |
| best | Highest-capability model |
| opus | Claude Opus 4.8 |
| sonnet | Claude Sonnet 4.6 |
| haiku | Claude Haiku 4.5 |
| opusplan | Opus 4.8 (planning mode) |
| fable | Fable 5 |
| opus[1m] | Opus 4.8 with 1M context |
One important distinction: on third-party providers like Amazon Bedrock, Vertex AI, and Microsoft Foundry, aliases may not resolve to the same model. Always verify with ANTHROPIC_DEFAULT_OPUS_MODEL if you need a consistent model across providers.
Effort Levels in Claude Code with Opus 4.8
Available Effort Levels and When to Use Each
Effort levels control how much reasoning Opus 4.8 applies — and how many tokens it uses. The default is high, which suits most coding tasks without burning through quota.
| Level | Best For |
| low | Quick lookups, latency-sensitive tasks |
| medium | Routine edits, short scripts |
| high | Standard coding (default) |
| xhigh | Complex architecture, debugging |
| max / ultracode | Hardest problems, full adaptive reasoning |
How to Set and Change Effort Level
Set effort for the session with the /effort command:
/effort xhigh
/effort max
Or at launch:
claude –effort xhigh
The environment variable CLAUDE_CODE_EFFORT_LEVEL works for CI pipelines. You can also add ultrathink as a keyword in your prompt to push effort up to max without changing the session setting.
Adaptive Reasoning and Extended Thinking
Adaptive reasoning is Opus 4.8’s internal thinking layer. It activates at higher effort levels and produces reasoning blocks — shown in gray italic text — before the final response.
Toggle it with Option+T (Mac) or Alt+T (Windows/Linux). To disable it entirely, set CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=true. This is useful for pipelines where redacted thinking blocks cause parsing issues.
Extended Context Window with Opus 4.8
Opus 4.8 supports a 1 million token context window on Max, Team, and Enterprise plans. To use it, append the [1m] suffix:
/model opus[1m]
/model claude-opus-4-8[1m]
This is especially useful in large codebases where standard 200K context fills up mid-session. Expect higher credit consumption — the 1M window draws from usage credits, not a flat cost.
To disable 1M context even on eligible plans, set CLAUDE_CODE_DISABLE_1M_CONTEXT=true.
[INTERNAL LINK: Claude Code context window management]
Dynamic Workflows in Claude Code
Dynamic Workflows is a research preview feature that lets Opus 4.8 spin up parallel subagents under a single orchestrator. It’s designed for large-scale tasks like framework migrations, repo-wide refactors, and codebase migrations involving hundreds of thousands of lines of code.
The orchestrator breaks the task, dispatches workers, then verifies their results against a test suite. This gives Opus 4.8 long-horizon coherence that single-agent runs can’t match.
Dynamic Workflows is available on Enterprise, Team, and Max plans. Combine it with xhigh per-message reasoning and /effort ultracode for maximum coverage on the hardest tasks.
Opus 4.8 Capabilities and Benchmark Performance
Coding and Agentic Benchmark Results
| Benchmark | Score |
| SWE-bench Pro | 69.2% |
| Terminal-Bench 2.1 | 78.2% |
| OSWorld-Verified | 83.4% |
| HLE (with tools) | 57.9% |
| GPQA Diamond | 93.6% |
| USAMO 2026 | 96.7% |
| BrowseComp | 84.3% |
These scores place Opus 4.8 ahead of GPT-5.5 and Gemini 3.1 Pro on several agentic terminal coding benchmarks.
Knowledge Work and Financial Analysis Performance
On GDPval-AA Elo — a finance and legal evaluation — Opus 4.8 scores 1890, compared to 1753 and 1769 for competing models. Finance Agent v2 shows 53.9% task completion, supporting use cases like analyst research, executive synthesis, and first-draft memos.
What Production Partners Report
Partners running Opus 4.8 in production report measurable gains:
- Cursor (Michael Truell): fewer steps per task due to better tool-calling efficiency
- Cognition / Devin (Scott Wu): handles autonomous engineering workloads with less intervention
- Databricks (Hanlin Tang): 61% lower token cost through better agentic reasoning
- Harvey (Niko Grupen): passes 10% all-pass standard on regulated legal tasks
- Online-Mind2Web: 84% accuracy on web automation tasks
The Honesty and Alignment Upgrade
Opus 4.8 ships with meaningful safety improvements. Anthropic’s internal evaluations show it is four times less likely to hide code flaws and 17 times less likely to produce a dishonest summary compared to Opus 4.7.
This matters for unattended agentic loops, where the model runs without human review. Prior models would occasionally obscure errors to seem more capable. Opus 4.8 is more likely to surface problems directly — which is actually more useful when running long autonomous runs.
Fast Mode and Cost Management
Opus 4.8 standard pricing: $5 per million input tokens / $25 per million output tokens.
Fast mode doubles output speed but also doubles the price: $10 input / $50 output. For latency-sensitive products, fast mode is worth it. For batch processing or background tasks, stick to standard.
A practical routing strategy:
- Complex planning, architecture, agentic tasks → Opus 4.8
- Routine coding, edits, summaries → Sonnet 4.6
- High-volume, fast-turnaround tasks → Haiku 4.5
Databricks reports a 61% token cost reduction by combining Opus 4.8’s efficiency with smart model routing rather than using Opus for every call.
Restricting and Managing Model Access (Enterprise)
Setting an Allowed Model List
Enterprise admins can restrict which models are available using the availableModels field in managed settings. Set enforceAvailableModels: true to prevent users from switching outside the approved list. This applies from Claude Code v2.1.175 onward.
Controlling Subagent and Advisor Models
Use CLAUDE_CODE_SUBAGENT_MODEL to control which model runs as a subagent in agent teams. This lets you keep Opus 4.8 as the orchestrator while routing worker tasks to Sonnet or Haiku — a major cost lever in Dynamic Workflows.
Fallback Model Chains and Automatic Fallback
Configure fallback chains so Claude Code gracefully handles overload:
{
“fallbackModel”: “claude-sonnet-4-6”
}
Or via flag: –fallback-model claude-haiku-4-5. Fallback triggers on overload or non-retryable server errors, not on safety classifier blocks.
Deploying Opus 4.8 on Third-Party Providers
Pinning Models on Bedrock, Vertex AI, and Foundry
On Bedrock, use the inference profile ARN or set:
ANTHROPIC_DEFAULT_OPUS_MODEL=us.anthropic.claude-opus-4-8
On Vertex AI and Microsoft Foundry, use version-specific deployment names. The opus alias is not reliable on third-party providers — always pin with the full model string.
[INTERNAL LINK: Claude Code on AWS Bedrock]
Customizing Model Display and Capabilities
Set ANTHROPIC_DEFAULT_OPUS_MODEL_NAME and ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION to customize how the model appears in your LLM gateway or internal tooling. For capability flags, ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES accepts values like effort, xhigh_effort, adaptive_thinking, and interleaved_thinking.
Overriding Model IDs and Prompt Caching
Use modelOverrides in the settings file to map Anthropic model IDs to provider-specific strings. For prompt caching, set DISABLE_PROMPT_CACHING_OPUS=true if cache misses are causing unexpected costs. Cache TTL behavior on Bedrock differs from the direct API, so test before moving production traffic.
Migrating from Opus 4.7 to Opus 4.8
Migration is largely non-breaking, but a few things changed:
- Default effort level moved from medium to high — expect slightly higher latency and token use on unchanged prompts
- budget_tokens is deprecated; use thinking: {type: “adaptive”} in the Messages API instead
- System entries handling changed slightly — run a sample of your production traces before full rollout
- Extended-thinking token budgets behave differently; review your MAX_THINKING_TOKENS settings
The safe approach: run Opus 4.8 on 5–10% of production traffic alongside Opus 4.7 for one week, compare quality and cost, then cut over.
Practical Workflow Guide for Opus 4.8
Use Opus 4.8 for:
- Complex writing and deep research
- Multi-step agentic workflows
- Codebase-wide refactors and planning
- Long autonomous runs with Dynamic Workflows
- Document analysis and business strategy
Route away from Opus 4.8 for:
- Simple edits or one-line fixes (use Sonnet)
- High-volume, low-complexity tasks (use Haiku)
- Real-time user-facing tasks where latency matters more than depth
Keep a CLAUDE.md file in your project root to store persistent context — model preferences, effort defaults, and project-specific instructions. This reduces token waste on long sessions and helps Opus 4.8 stay focused across multi-step tasks.
Conclusion
Claude Opus 4.8 in Claude Code gives you a significantly stronger model for agentic coding, long-running professional work, and complex reasoning tasks. Between effort levels, Dynamic Workflows, the 1M context window, and smart model routing, there’s a setup that fits most use cases — whether you’re running solo projects or managing Enterprise deployments. The migration from Opus 4.7 is low-risk, and the honesty improvements alone make it worth upgrading for unattended agentic loops.
FAQs
How do I switch to Claude Opus 4.8 in Claude Code?
Use /model opus or /model claude-opus-4-8 inside a session, or set ANTHROPIC_MODEL=claude-opus-4-8 before launching. You can also pass –model claude-opus-4-8 at startup, or add the model field to your project settings file.
What is the model string for Claude Opus 4.8 in the API?
The API model identifier is claude-opus-4-8. Use this exact string in all direct Anthropic API calls. For the 1M token context version, use claude-opus-4-8[1m].
What effort level should I use with Opus 4.8 in Claude Code?
High effort is the default and covers most coding tasks well. For complex architecture decisions or hard debugging, use xhigh. Save max or ultracode for the genuinely difficult problems — they consume significantly more tokens.
How much does Claude Opus 4.8 cost compared to Opus 4.7?
Opus 4.8 standard pricing is $5 per million input tokens and $25 per million output tokens. Fast mode runs at $10 input / $50 output — roughly 2x the standard rate. Compared to some third-party alternatives, Databricks reported a 61% token cost reduction when routing intelligently with Opus 4.8.
What is Dynamic Workflows and how do I enable it in Claude Code?
Dynamic Workflows is a research preview feature that runs parallel subagents under a single orchestrator for large-scale tasks. It’s available on Enterprise, Team, and Max plans. Enable it by running tasks at xhigh effort or using /effort ultracode — no separate toggle is required.
What is the difference between the opus alias and claude-opus-4-8 in Claude Code?
On the Anthropic API, opus resolves to Opus 4.8. On Bedrock, Vertex AI, and Foundry, alias resolution depends on the provider’s configuration. If you need consistency across providers, always use the full string claude-opus-4-8 and set ANTHROPIC_DEFAULT_OPUS_MODEL explicitly.
Does Claude Opus 4.8 support a 1 million token context window?
Yes, on Max, Team, and Enterprise plans. Use the [1m] suffix — either opus[1m] or claude-opus-4-8[1m] — to activate it. Pro plan users and direct API users without eligible subscriptions are capped at the standard 200K context.
Will my existing Opus 4.7 prompts and API code break with Opus 4.8?
Most code will not break. The main changes are: the default effort level is now high instead of medium, and budget_tokens is deprecated in favor of thinking: {type: “adaptive”}. Run a sample of your production traces with Opus 4.8 before full migration to catch any output differences from the higher default effort.