C:/Program Files/Git/model command persists globally, affecting separate terminal sessions
Resolved 💬 5 comments Opened Jan 13, 2026 by semiprobono Closed Apr 12, 2026
Description
Using the /model command in one Claude Code terminal session unexpectedly changes the model in completely separate terminal sessions (different processes). This causes:
- Unexpected compactions mid-session (e.g., Sonnet 1m → Opus)
- Degraded quality for complex tasks when Opus sessions unexpectedly switch to Sonnet
Steps to Reproduce
- Open Terminal A, run
claudein Directory A - Open Terminal B, run
claudein Directory B - In Terminal A, use
/model sonnet - Observe that Terminal B's model has also changed to Sonnet
Expected Behavior
Each Claude Code process should maintain its own isolated model selection. Using /model in one terminal should not affect other terminals/processes.
Actual Behavior
/model appears to persist to a global file (possibly ~/.claude/settings.json or ~/.claude.json), causing all active Claude Code sessions to pick up the change.
Environment
- Claude Code version: 2.1.x+
- OS: Windows
Questions for Maintainers
- Is
/modelintended to persist globally, or should it be ephemeral (session-only)? - If global persistence is intended, is there a way to set per-session model selection without affecting other sessions?
Current Workaround
Using claude --model <model> at startup instead of /model mid-session appears to work, but this doesn't help when needing to switch models during an active session without affecting other sessions.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗