Session defaults to claude-opus-5[1m] (1M context) which is unavailable to my org, silently falls back and overwrites saved model preference

Status Open
Reported on v2.1.219
Maintainer reply None cached
Activity 3 comments · opened Jul 25, 2026

Environment

  • Claude Code version: 2.1.219
  • Auth: Claude.ai OAuth (enterprise org), not raw Anthropic API key
  • Launch: claude --dangerously-skip-permissions (plain terminal, no --model flag)
  • Platform: macOS (Darwin 25.5.0)

What happened

  1. Started a new session with no --model flag and no model key set in ~/.claude/settings.json at the time.
  2. The session banner reported: "You are powered by the model named Opus 5 (1M context). The exact model ID is claude-opus-5[1m]."
  3. On the very first turn, the CLI failed with: "There's an issue with the selected model (claude-opus-5[1m]). It may not exist or you may not have access to it. Run /model to pick a different model."
  4. I ran /model, picked Sonnet 5 to unblock, and it was saved as the new default in ~/.claude/settings.json ("model": "sonnet").

Root cause (as far as I can diagnose client-side)

  • No env vars (ANTHROPIC_MODEL, CLAUDE_MODEL) and no project/global settings specified a model before this session started.
  • No ANTHROPIC_API_KEY present — auth is entirely via the Claude.ai enterprise OAuth session.
  • This means the CLI's own default-model resolution logic chose claude-opus-5[1m] (the 1M-context variant of Opus 5) for a brand-new session, without checking whether that specific context-window variant is entitled/available for the authenticated org first.
  • The failure then silently persisted "sonnet" as my new global default — overwriting whatever the prior resolved default would have been, as a side effect of an error recovery flow I didn't explicitly opt into.

Expected behavior

  • Default model resolution should not select a model/context-variant combination that isn't available to the authenticated account/org, or should validate availability before starting the session.
  • If a fallback is required, the CLI should not silently persist that fallback as the user's permanent default in settings.json without an explicit confirmation — it should be scoped to the session, or the user should be asked.

Additional context

Would also like clarity on how the 1M-context Opus 5 variant (claude-opus-5[1m]) is provisioned for enterprise orgs — is it a separate entitlement from base Opus 5, and if so, how can an org admin request/enable it?

View original on GitHub ↗

3 Comments

ChristopherRyanElliott · 1 month ago

Author requested free Opus 5 access if it turned out to be fruitful.

ChristopherRyanElliott · 1 month ago

Additional timing data that may help correlate this:

  • 2.1.218 installed 2026-07-23 09:05
  • 2.1.219 installed 2026-07-24 18:11 (same day this issue was filed)
  • I don't have a changelog for .219 to confirm what changed in the model-resolution path, but the timing lines up with when this behavior started for me — previously (a few days prior) I don't recall having this failure when switching models via /model.

Not asserting causation without more to go on, but flagging the version bump as the most likely correlated change in case it helps narrow down what shifted in default/fallback model resolution.

ChristopherRyanElliott · 1 month ago

Correction/update: tested plain \claude --model claude-opus-5\ (no 1M suffix) directly — it fails identically:

There's an issue with the selected model (claude-opus-5). It may not exist or you may not have access to it.

So this isn't scoped to the 1M-context variant specifically — Opus 5 in any form is currently unavailable to this account/org (enterprise Claude.ai OAuth, org "Campspot"). Widening the ask: is Opus 5 base access provisioned separately per-org, and if so what's the process to enable it?