claude-code - 💡(How to fix) Fix Per-session model/effort settings isolated to the current window [1 comments, 2 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#45167Fetched 2026-04-09 08:11:44
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1
RAW_BUFFERClick to expand / collapse

Problem

Model selection, alwaysThinkingEnabled, and effortLevel are persisted globally in ~/.claude/settings.json. Changing any of these in one Claude Code window immediately affects all other open instances.

Use case

It's common to have multiple CC windows open for different tasks simultaneously — e.g. one window on sonnet for quick edits and another on opus for complex architecture work. Today that's not possible; the last change always wins globally.

Requested behaviour

Allow model/effort/thinking settings changed via /model or the model picker (meta+p) to stay local to the current session without being written back to ~/.claude/settings.json. The global file would still act as the default for new sessions.

A possible implementation: an in-session override layer (env var, CLI flag, or auto-detected per-process) that takes precedence over the persisted global setting for that window only.

extent analysis

TL;DR

Implement an in-session override mechanism to store model, effort, and thinking settings locally for each Claude Code window, without writing changes back to the global ~/.claude/settings.json file.

Guidance

  • Introduce a new, session-specific storage mechanism, such as an environment variable or a CLI flag, to override global settings for each window.
  • Modify the /model command and model picker (meta+p) to update the local, in-session settings instead of the global ~/.claude/settings.json file.
  • Ensure that new sessions default to the global settings stored in ~/.claude/settings.json, while allowing existing sessions to maintain their local overrides.
  • Consider using a unique identifier for each session to manage the local settings, such as a process ID or a random session ID.

Example

// Example of a possible in-session override storage
{
  "sessionId": "12345",
  "model": "sonnet",
  "effortLevel": "high",
  "alwaysThinkingEnabled": true
}

Notes

The implementation details of the in-session override mechanism will depend on the specific requirements and constraints of the Claude Code application. This solution assumes that the global ~/.claude/settings.json file will continue to serve as the default for new sessions.

Recommendation

Apply a workaround by implementing an in-session override layer, as this will allow for the desired behavior without modifying the underlying global settings storage. This approach will enable users to have multiple Claude Code windows with different settings, while still maintaining a global default.

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