claude-code - ✅(Solved) Fix [BUG] settings.json model preference ignored on v2.1.111 — sessions default to Opus 4.7 despite explicit model pin [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49503Fetched 2026-04-17 08:39:17
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×1referenced ×1subscribed ×1

Fix Action

Fixed

PR fix notes

PR #412: fix: bump CLI versions — codex 0.121.0, gemini 0.38.1, copilot 1.0.30, cursor 2026.04.15

Description (problem / solution / changelog)

Summary

Bump pinned CLI versions in Dockerfiles after investigating latest releases and upstream bug trackers.

Changes

DockerfileCLIOldNewNotes
Dockerfile.codex@openai/codex0.120.00.121.0No CLI-specific regressions; open bugs are VS Code extension/desktop app only
Dockerfile.gemini@google/gemini-cli0.37.20.38.1Clean — zero open bugs with bug label
Dockerfile.copilot@github/copilot1.0.251.0.30No public issue tracker (repo 404); low risk
Dockerfile.cursorCursor Agent CLI2026.04.14-ee4b43a2026.04.15-dccdccdVersion from official install script; ships with Cursor 3.1 (Apr 13)

NOT updated (intentionally)

DockerfileCLIPinnedLatestWhy
Dockerfilekiro-cli2.0.02.0.0Already latest
Dockerfile.claude@anthropic-ai/claude-code2.1.1042.1.112⚠️ Too risky for container workloads — see below
Dockerfile.opencodeopencode-ai1.4.61.4.6Already latest

claude-code risk assessment

  • #49512 (2.1.112): ENOENT race condition on mkdir of per-session tasks dir when running parallel sessions — labeled regression + platform:linux. Directly impacts openab which runs containers with concurrent sessions.
  • #49503 (2.1.111): settings.json model preference silently ignored — sessions default to Opus 4.7 instead of pinned model.
  • #47648 (2.1.105+): Auth token paste broken on Linux — closed as "not planned" (the original issue that triggered PR #333 revert to 2.1.104).

Recommendation: stay on 2.1.104 until upstream resolves the parallel session race condition.

How to verify

# Check latest versions
curl -fsSL https://prod.download.cli.kiro.dev/stable/latest/manifest.json | jq -r .version
npm view @openai/codex version
npm view @anthropic-ai/claude-code version
npm view @google/gemini-cli version
npm view @github/copilot version
curl -fsSL https://cursor.com/install | grep "CURSOR_VERSION\|DOWNLOAD_URL" | head -2
npm view opencode-ai version

Ref: #326, #333

Changed files

  • Dockerfile.codex (modified, +1/-1)
  • Dockerfile.copilot (modified, +1/-1)
  • Dockerfile.cursor (modified, +1/-1)
  • Dockerfile.gemini (modified, +1/-1)
RAW_BUFFERClick to expand / collapse

What's Wrong?

~/.claude/settings.json contains "model": "claude-opus-4-6" but claude --resume on v2.1.111 starts the session on Opus 4.7.

What Should Happen?

If the user has an explicit model preference in settings.json, the session should respect it. Users should be able to pin their model via configuration without having to run /model on every resume.

Steps to Reproduce

  1. Set "model": "claude-opus-4-6" in ~/.claude/settings.json
  2. npm install -g @anthropic-ai/[email protected]
  3. claude --resume on any existing session
  4. Observe: session starts on Opus 4.7, not 4.6

Impact

Opus 4.7 uses adaptive thinking which consumes Q5h quota at approximately 2.4x the rate of 4.6 (measured across 71 API calls, cross-validated by independent gateway proxy data). Users who have pinned 4.6 in settings.json to avoid this cost increase are silently overridden.

See community discussion with metered data: https://github.com/cnighswonger/claude-code-cache-fix/discussions/25

Claude Code Version

2.1.111

Platform

Anthropic API (subscription, Max 5x)

Operating System

Ubuntu Linux

Terminal/Shell

bash

extent analysis

TL;DR

The issue can be fixed by ensuring that the claude --resume command respects the model preference specified in the ~/.claude/settings.json file.

Guidance

  • Verify that the ~/.claude/settings.json file is correctly formatted and contains the desired model preference, in this case, "model": "claude-opus-4-6".
  • Check the claude command's documentation or source code to see if there are any options or flags that can be used to force the command to respect the model preference specified in the settings file.
  • Consider modifying the claude --resume command to include an explicit model specification, such as claude --model "claude-opus-4-6" --resume, to ensure that the desired model is used.
  • Investigate the community discussion and metered data provided in the issue to better understand the impact of the issue and potential workarounds.

Example

No code snippet is provided as the issue does not require a code change, but rather a configuration or command-line flag change.

Notes

The issue is specific to version 2.1.111 of the claude package, and the workaround or fix may not be applicable to other versions.

Recommendation

Apply a workaround, such as specifying the model explicitly with the --model flag, until a fixed version of the claude package is available that respects the model preference specified in the settings file.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - ✅(Solved) Fix [BUG] settings.json model preference ignored on v2.1.111 — sessions default to Opus 4.7 despite explicit model pin [1 pull requests, 1 participants]