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

  1. Open Terminal A, run claude in Directory A
  2. Open Terminal B, run claude in Directory B
  3. In Terminal A, use /model sonnet
  4. 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

  1. Is /model intended to persist globally, or should it be ephemeral (session-only)?
  2. 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.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗