[BUG] | v2.1.156: settings.json "model" field silently ignored for interactive sessions

Resolved 💬 1 comment Opened May 29, 2026 by Joel-Reid-Dev Closed Jul 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary

field in ~/.claude/settings.json is silently ignored for interactive sessions. The CLI accepts the same model ID via the --model flag and via the ANTHROPIC_MODEL env var, so the model is available and the ID is correct - only the settings.json path fails.

## Repro

  1. Add "model": "claude-opus-4-8" to ~/.claude/settings.json at the top level.
  2. Fully quit Claude Code (Cmd+Q) and relaunch with bare claude (no flags).
  3. Ask "what model are you running" in the new session.

## Expected
Banner / session reports claude-opus-4-8.

## Actual
Banner / session reports Opus 4.7 (claude-opus-4-7).

## Confirmed workarounds (both work)

  • claude --model claude-opus-4-8 --print "..." → reports claude-opus-4-8
  • export ANTHROPIC_MODEL=claude-opus-4-8 in shell rc → next session reports claude-opus-4-8

## What I ruled out

  • ANTHROPIC_MODEL env var unset before the workaround.
  • No --model flag in the launch command.
  • No model override in project-level .claude/settings.local.json.
  • No model key in ~/.claude.json (only historical usage stats).
  • Tried "model": "opus" (family alias) first, same result. Switching to the explicit dateless ID claude-opus-4-8 per the docs (model IDs are pinned snapshots from the 4.6 generation onward) didn't change the behaviour.

What Should Happen?

The model field in ~/.claude/settings.json should be honoured at session
start for interactive sessions, matching the documented behaviour:

> model — Override the default model to use for Claude Code. --model and
ANTHROPIC_MODEL override this for one session.
> (https://code.claude.com/docs/en/settings)

Expected precedence (highest → lowest):

  1. --model CLI flag
  2. ANTHROPIC_MODEL env var
  3. model field in settings.json
  4. CLI built-in default

A fresh claude launch (no flags, no env override) with "model":
"claude-opus-4-8"
set in ~/.claude/settings.json should report
claude-opus-4-8. Today it reports claude-opus-4-7, indicating step 3 is
being skipped entirely.

Error Messages/Logs

Steps to Reproduce

  1. On Claude Code v2.1.156 (native install), edit ~/.claude/settings.json

and add the top-level field: "model": "claude-opus-4-8".

  1. Confirm ANTHROPIC_MODEL is unset: echo "${ANTHROPIC_MODEL:-(unset)}".
  2. Fully quit Claude Code (Cmd+Q on macOS) and relaunch with bare claude (no

flags).

  1. Ask the assistant: "what model are you running".

Expected: assistant reports claude-opus-4-8 and the launch banner shows
"Opus 4.8".
Actual: assistant reports claude-opus-4-7 and the launch banner shows "Opus
4.7".

Sanity-check showing the model ID is valid and reachable:

  1. From the same shell, run: `claude --model claude-opus-4-8 --print "respond

with only the literal model id you are running"`

  1. Output: claude-opus-4-8.

Workaround that confirms the env-var path works too:

  1. Add export ANTHROPIC_MODEL=claude-opus-4-8 to ~/.zshrc, open a new

terminal, launch claude, ask the same question. Reports claude-opus-4-8 as
expected.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

N/A

Claude Code Version

2.1.156 (native install)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Terminal: Hyper 3.4.1 (selected "Other" since not in the dropdown).

Partial-read clue (might narrow the bug):

  • The effortLevel field in the same settings.json is being honoured (or at least re-exported). My CLAUDE_EFFORT env var is automatically set to xhigh, matching "effortLevel": "xhigh" in settings.json. So settings.json is being parsed at session start; only the model field path appears to be skipped.
  • The launch banner reflects the wrong model too: it says "Opus 4.7 with high effort" rather than "Opus 4.8 with high effort". So the model isn't being chosen above the banner-render layer either.

Tried unsuccessfully:

  • "model": "opus" (family alias) — session stayed on 4.7.
  • "model": "claude-opus-4-8" (explicit dateless ID per

https://platform.claude.com/docs/en/about-claude/models/overview, which says model IDs in the 4.6 generation onward are pinned snapshots, not evergreen pointers) — same result.

Workaround in place: export ANTHROPIC_MODEL=claude-opus-4-8 in ~/.zshrc.
Next session reports claude-opus-4-8 and banner says "Opus 4.8".

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗