CLAUDE_OPUS_4_8
Updated by Alex Sorokoletov
CLAUDE_OPUS_4_8 is a Claude Code environment variable. Removed between v2.1.252 and v2.1.266, so current releases ignore it. It is not in the official reference.
| Status | Removed between v2.1.252 and v2.1.266 |
|---|---|
| Added | Added between v2.1.143 and v2.1.212 |
| Category | Models and thinking |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_OPUS_4_8=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_OPUS_4_8": "<value>"
}
}Related variables
ANTHROPIC_DEFAULT_OPUS_MODEL: Override Opus model ID.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTIONANTHROPIC_DEFAULT_OPUS_MODEL_NAMEANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIESCLAUDE_CODE_3P_PROBE_WROTE_OPUS_DEFAULT: Records the Opus model value written by the third-party model probe, so an ANTHROPIC_DEFAULT_OPUS_MODEL equal to it counts as auto-detected rather than user-set.CLAUDE_CODE_3P_SEEDED_OPUS_DEFAULT: Records the Opus model value seeded as the default, so an ANTHROPIC_DEFAULT_OPUS_MODEL equal to it is treated as the seeded value rather than a user override.CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODECLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE: Pin Fast mode to Opus 4.6.
Frequently asked questions
Which Claude Code version has CLAUDE_OPUS_4_8?
Removed between v2.1.252 and v2.1.266, so current releases ignore it.
How do I set CLAUDE_OPUS_4_8?
Export it before starting Claude Code (export CLAUDE_OPUS_4_8=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.