Model config in settings.json silently ignored

Resolved 💬 3 comments Opened Mar 13, 2026 by TheChasman Closed Mar 17, 2026

Summary

Claude Code v2.1.75 ignores the "model" key in ~/.claude/settings.json
and provides no error or warning. The CLAUDE_MODEL env var is partially
read but misinterprets the alias opus, silently downgrading to Sonnet 4.5.
Only ANTHROPIC_MODEL=opus works.

Environment

  • Claude Code version: v2.1.75
  • OS: macOS (M1 Mac, 32GB RAM)
  • Shell: zsh (Oh My Zsh)
  • Subscription tier: Claude Max
  • Relevant config: Custom statusline, pyright-lsp plugin enabled

Steps to reproduce

  1. Add "model": "claude-opus-4-6" to ~/.claude/settings.json
  2. Kill all Claude Code processes (pkill -f "claude")
  3. Verify the file contains the model key (cat ~/.claude/settings.json)
  4. Launch claude
  5. Observe: starts as claude-sonnet-4-6-20260217 — model key ignored
  1. Try "model": "opus" instead — same result
  1. Set CLAUDE_MODEL=opus in environment
  2. Launch claude
  3. Observe: starts as Sonnet 4.5 — alias not recognised, silent downgrade
  1. Set ANTHROPIC_MODEL=opus in environment
  2. Launch claude
  3. Observe: starts as Opus — this is the only method that works

Expected behaviour

Any of these three config methods should set the model, or produce a clear
error explaining why they can't.

Actual behaviour

  • settings.json "model" key: silently ignored, no error
  • CLAUDE_MODEL=opus: silently downgrades to Sonnet 4.5
  • ANTHROPIC_MODEL=opus: works (only working method found)

Workarounds attempted

| Method | Result |
|---|---|
| "model": "claude-opus-4-6" in settings.json | Ignored |
| "model": "opus" in settings.json | Ignored |
| claude config set model claude-opus-4-6 | Launched interactive session instead of writing config |
| CLAUDE_MODEL=opus | Downgraded to Sonnet 4.5 |

Resolution

ANTHROPIC_MODEL=opus in ~/.zshrc is the only reliable method.

Additional context

  • settings.json was not being overwritten (verified via diff) — the key

is simply not read.

  • claude config set appears to launch an interactive session rather than

acting as a standalone config command.

  • The silent downgrade when using CLAUDE_MODEL=opus (Sonnet 4.6 → 4.5)

suggests partial env var parsing with broken alias resolution.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗