{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreieahsnuayxlrio6jhczqvt5g4xtu3bty3y357bv4sxf2gdq6btrqy",
"uri": "at://did:plc:ws6dhxzqnqxu5aqxt4kd27oc/app.bsky.feed.post/3mn4ng2lup2h2"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreidu6faep27glrlpdaxh6w4bhennu2q2nomnxgb4qzmez4q46f4yve"
},
"mimeType": "image/jpeg",
"size": 58524
},
"description": "Switch Claude Code to claude-opus-4-8 with the model picker, a launch flag, or a saved default after updating the CLI.",
"path": "/how-to-use-opus-4-8-in-claude-code-setup-aliases-effort/",
"publishedAt": "2026-05-31T03:40:45.000Z",
"site": "https://allthings.how",
"textContent": "Claude Code can run Anthropic's newest Opus model, Opus 4.8, once you point the CLI at it. The model ID is `claude-opus-4-8`, and you can select it from inside a session, at launch, or as your saved default. On the Anthropic API, the `opus` alias already resolves to Opus 4.8, so accounts on that platform may get it without any extra steps.\n\n✅\n\nQuick answer: Update Claude Code to v2.1.154 or later with claude update, then run /model claude-opus-4-8 inside a session. Confirm with /status.\n\n* * *\n\n### Requirements before you can select Opus 4.8\n\nOpus 4.8 needs Claude Code v2.1.154 or later. If the model does not appear in the picker, your CLI is likely on an older build. Run the updater first, then start a fresh session.\n\n\n claude update\n\n\nAccess also depends on your plan and provider. The model is available on Pro, Max, Team, and Enterprise plans, and through the Claude API, Amazon Web Services, Google Cloud, and Microsoft Foundry. If you reach Claude Code through Bedrock, Vertex, or Foundry, the short aliases point to older Opus and Sonnet versions, so you will need to name Opus 4.8 directly or set a provider default (covered below).\n\n* * *\n\n### Method 1: Switch with the /model command\n\nThe fastest route is the in-session picker. It applies immediately without restarting your terminal, and as of v2.1.153 it also saves your choice as the default for new sessions.\n\n**Step 1:** Start Claude Code by running `claude` in your terminal.\n\n**Step 2:** Type `/model` and press Enter to open the interactive menu, or type `/model claude-opus-4-8` to switch directly.\n\n**Step 3:** In the picker, press Enter to switch and save Opus 4.8 as your default, or press `s` to use it for the current session only.\n\nIf your conversation already has output, the picker asks you to confirm, because the next response re-reads the full history without cached context. Project and managed settings still take priority and reapply on the next launch, so a workplace policy can override your pick.\n\n* * *\n\n### Method 2: Launch with the --model flag\n\nTo use Opus 4.8 for a single run without changing your saved default, pass the model when you start the CLI. This is also the clean way to run different models in separate terminals at the same time.\n\n\n claude --model claude-opus-4-8\n\n\nThe flag applies only to the session you launch with it. Close that terminal and your previous default returns.\n\n* * *\n\n### Method 3: Set Opus 4.8 as a permanent default\n\nIf you want Opus 4.8 every time, set it once in your shell so future sessions start there. First check which shell you use, then write the model variable to its config file.\n\n**Step 1:** Find your shell by running `echo $SHELL`. A result of `/bin/zsh` means zsh (macOS default), and `/bin/bash` means bash (common on Linux).\n\n**Step 2:** Add the model variable to the matching config file.\n\n\n echo 'export ANTHROPIC_MODEL=\"claude-opus-4-8\"' >> ~/.zshrc\n\n\nzsh (macOS)\n\n\n echo 'export ANTHROPIC_MODEL=\"claude-opus-4-8\"' >> ~/.bashrc\n\n\nbash (Linux)\n\n**Step 3:** Apply the change with `source ~/.zshrc` or `source ~/.bashrc`, then close the terminal completely and reopen it.\n\n**Step 4:** Start a fresh session with `claude`. Opus 4.8 is now the default for new sessions.\n\nYou can also pin the model in your settings file using the `model` field, which behaves as an initial selection rather than a hard lock. Note that `ANTHROPIC_MODEL` and `--model` apply only to the sessions that read them, and a resumed session keeps the model it was saved with regardless of your current setting.\n\n* * *\n\n### Model names, aliases, and how they resolve\n\nYou can target a model by its exact name or by an alias. The `opus` alias tracks the latest Opus, but where it lands depends on the provider, so pin the full name when you need certainty.\n\nValue| What it selects in Claude Code\n---|---\n`claude-opus-4-8`| Opus 4.8 explicitly, on any provider that offers it\n`opus`| Opus 4.8 on the Anthropic API; Opus 4.7 on Claude Platform on AWS; Opus 4.6 on Bedrock, Vertex, and Foundry\n`opus[1m]`| Opus with a 1 million token context window for long sessions\n`opusplan`| Opus during plan mode, then Sonnet for execution\n`best`| The most capable model available, currently equal to `opus`\n`default`| Clears any override and reverts to the recommended model for your account\n\nOn Bedrock, Vertex, or Foundry, you can keep the alias but point it at Opus 4.8 by setting `ANTHROPIC_DEFAULT_OPUS_MODEL` to the full model name. The `default` value already resolves to Opus 4.8 for Max, Team Premium, Enterprise pay-as-you-go, and Anthropic API accounts, so those users may already be on it.\n\nℹ️\n\nOn the opusplan alias, the planning phase runs Opus with the standard 200K context window. The automatic 1M context upgrade applies to the plain opus setting, not to opusplan.\n\n* * *\n\n### Adjust the effort level for Opus 4.8\n\nEffort controls how much the model reasons before answering. Opus 4.8 supports five levels and defaults to `high`. When you first run it, Claude Code applies that default even if you previously set a different level for another model, so run `/effort` again to change it.\n\nLevel| Behavior on Opus 4.8\n---|---\n`low`| Fastest and cheapest, minimal reasoning; persists across sessions\n`medium`| Balanced reasoning; persists across sessions\n`high`| Default; deeper reasoning with good latency; persists across sessions\n`xhigh`| Extra reasoning budget for hard problems; persists across sessions\n`max`| Deepest reasoning, no token-spend limit; current session only unless set via `CLAUDE_CODE_EFFORT_LEVEL`\n\nThe `/effort` menu also offers `ultracode`. That is a Claude Code setting rather than a model level. It sends `xhigh` to the model and has Claude orchestrate dynamic workflows for larger tasks, and it applies to the current session only.\n\n* * *\n\n### Verify you are running Opus 4.8\n\nRun `/status` inside Claude Code to see the active model at any time. After a switch, the picker shows the change instantly, and a new session started with your saved default or environment variable will report `claude-opus-4-8` as the current model.\n\nIf the model still shows an older Opus or Sonnet, check these common reasons. The CLI may be below v2.1.154, in which case `claude update` fixes it. A project or managed settings file may be overriding your choice, which the startup header will indicate by naming the file that set the model. On Bedrock, Vertex, or Foundry, the `opus` alias points to an older release, so name `claude-opus-4-8` directly. And if your organization is Enterprise pay-as-you-go, Claude Code may fall back to Sonnet automatically once you cross a usage threshold with Opus.\n\n* * *\n\n### Dynamic Workflows and where else Opus 4.8 runs\n\nOpus 4.8 launched on May 28, 2026 with a 1M token context window by default on the Claude API, Amazon Bedrock, and Vertex AI, and 128K maximum output. Inside Claude Code, it powers Dynamic Workflows, a research-preview feature for eligible Enterprise, Team, and Max plans that lets Claude plan a large job, run many parallel subagents, and verify their output against your test suite before reporting back. That makes it suited to codebase-scale migrations, dependency upgrades, and repo-wide refactors that do not fit in a single context window.\n\nBeyond Anthropic's own surfaces, Opus 4.8 is also selectable in GitHub Copilot for Pro+, Business, and Enterprise users, where administrators must enable the Opus 4.8 policy in Copilot settings before it appears in the model picker. Cursor added it to its picker at launch as well.\n\n> For most Claude Code users, the practical path is short. Update the CLI, run `/model claude-opus-4-8`, set your effort level to taste, and confirm with `/status`. From there Opus 4.8 stays your default until a project policy, a resumed session, or a usage fallback changes it.",
"title": "How to Use Opus 4.8 in Claude Code (Setup, Aliases, Effort)",
"updatedAt": "2026-05-31T03:40:47.478Z"
}