claude-code - 💡(How to fix) Fix /model command silently persists effortLevel to settings.json, overriding user's preferred default [2 comments, 3 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#49076Fetched 2026-04-17 08:51:35
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×2
RAW_BUFFERClick to expand / collapse

Bug Description

The /model interactive picker silently writes the selected effortLevel to ~/.claude/settings.json as a persistent global default. This means every time you use /model to switch models, it overwrites your preferred effort level as a side effect — even if you only intended to change the model.

This is especially problematic when switching between Opus and Sonnet: since Sonnet doesn't support max effort, the picker defaults to high, which then gets persisted. The next time you open an Opus session, your effort level has been silently downgraded.

Steps to Reproduce

  1. Set "effortLevel": "max" in ~/.claude/settings.json
  2. Start a new session, confirm effort is max
  3. Use /model to switch to Sonnet (or any model), then switch back to Opus
  4. End the session and start a new one
  5. Check ~/.claude/settings.jsoneffortLevel has been changed from "max" to "high" (or whatever the picker showed during selection)

Additional reproduction (race condition)

  1. Use /model, select a model with low effort
  2. Immediately use /model again and select max effort
  3. End the session — settings.json may still contain "low" from the first call, as if the second call did not persist

Expected Behavior

Either:

  • Option A: /model should be session-only (as the documentation suggests) and should not write effortLevel to settings.json
  • Option B: If persistence is intended, /model should only persist the model selection, not the effort level — these are independent settings

Actual Behavior

/model writes both the model and the effort level to settings.json every time it's used. Users who have a preferred effortLevel: "max" find it silently downgraded after routine model switches.

Impact

From my own conversation history, this has silently overwritten my effortLevel at least 13 times over the past month:

  • 12 times changed from maxhigh (triggered by switching to Sonnet)
  • 1 time changed from maxlow (triggered by scrolling through the picker)

Each time I had to manually discover and fix it, either by asking Claude to edit settings.json or by using /model again.

Environment

  • Claude Code CLI (latest)
  • macOS, Apple Silicon
  • Model: claude-opus-4-6

Suggested Fix

Decouple model selection from effort level persistence. If a user has set effortLevel in their settings.json, the /model command should not overwrite it unless the user explicitly changes the effort level through a dedicated mechanism (e.g., editing settings.json or a dedicated /effort --persist command).

extent analysis

TL;DR

Decoupling model selection from effort level persistence in the /model command is likely to fix the issue.

Guidance

  • Verify the current behavior by following the steps to reproduce and checking the ~/.claude/settings.json file for changes.
  • Consider implementing a dedicated mechanism for changing the effort level, such as an /effort --persist command, to avoid overwriting the user's preferred effort level.
  • Review the code for the /model command to ensure it only persists the model selection and not the effort level.
  • Test the fix by switching between models and verifying that the effort level remains unchanged in ~/.claude/settings.json.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The suggested fix assumes that the intention is to decouple model selection from effort level persistence. However, if persistence is intended, the fix should ensure that only the model selection is persisted, not the effort level.

Recommendation

Apply a workaround by using a dedicated mechanism for changing the effort level, such as editing settings.json directly or using a potential /effort --persist command, to avoid overwriting the preferred effort level when switching models.

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