claude-code - 💡(How to fix) Fix [BUG] Per-session isolation for effort level and model selection

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…

Error Message

Error Messages/Logs

Root Cause

When running multiple Claude Code sessions in separate terminal tabs, changing the effort level or model in one tab immediately affects all other open sessions. This is because both settings are stored globally in ~/.claude.json, which is shared across all instances. It's impossible to run simultaneous sessions with different configurations — e.g., one tab on Sonnet with low effort for quick lookups and another on Opus with max effort for a complex task. The current workflow requires manually re-setting effort/model every time you switch tabs.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

When running multiple Claude Code sessions in separate terminal tabs, changing the effort level or model in one tab immediately affects all other open sessions. This is because both settings are stored globally in ~/.claude.json, which is shared across all instances. It's impossible to run simultaneous sessions with different configurations — e.g., one tab on Sonnet with low effort for quick lookups and another on Opus with max effort for a complex task. The current workflow requires manually re-setting effort/model every time you switch tabs.

What Should Happen?

Effort level and model selection should be stored per-session (in-memory) rather than written back to ~/.claude.json on every change. The global/settings.json value should serve as the default when a new session starts, but changes made within a session should not persist globally or affect other running sessions. Per-project defaults via .claude/settings.json would also be a useful complement.

Error Messages/Logs

Steps to Reproduce

  1. Open two terminal tabs, each running claude in any directory.
  2. In Tab 1, change the effort level (e.g., via /model → set effort to Max).
  3. Switch to Tab 2 — observe that the effort level has changed there as well, without any action taken in that tab.
  4. Repeat with model selection: change the model in Tab 1, observe it changes in Tab 2.

Note: The bug affects any two concurrently running Claude Code sessions. Both effort level and model selection appear to be stored globally in ~/.claude.json and written on every change, so any session mutation is immediately visible to all other sessions.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.116

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

To fix the issue, store effort level and model selection per-session instead of globally in ~/.claude.json.

Guidance

  • Identify the code responsible for writing effort level and model selection to ~/.claude.json and modify it to store these settings in-memory per session.
  • Introduce a mechanism to load the global defaults from ~/.claude.json when a new session starts, but do not overwrite these defaults with session-specific changes.
  • Consider adding support for per-project defaults via .claude/settings.json to provide more flexibility.
  • Verify the fix by running multiple sessions with different effort levels and models, and confirm that changes in one session do not affect others.

Example

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

Notes

The proposed solution assumes that the issue is caused by the global storage of effort level and model selection in ~/.claude.json. If the actual cause is different, the solution may need to be adjusted accordingly.

Recommendation

Apply a workaround by modifying the code to store effort level and model selection per-session, as this is the most direct way to address the issue.

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 - 💡(How to fix) Fix [BUG] Per-session isolation for effort level and model selection