Skip to content

/model command is global, not per-session #27627

Description

@invidious9000

Description

The /model command changes the model for all running sessions, not just the current one. When you run /model in one terminal window, the change propagates to other Claude Code sessions within 1-2 seconds.

Root cause

/model writes to ~/.claude/settings.json, which is a global settings file. All sessions read from this file, so a model change in one session is picked up by all others.

{
  "model": "opus",
  "skipDangerousModePermissionPrompt": true
}

Expected behavior

/model should be per-session. The global settings file should serve as the default, but changing the model in one session should not affect other running sessions.

Steps to reproduce

  1. Open two separate terminal windows (not tmux panes — independent processes)
  2. Run claude in both
  3. In window A, run /model and switch to a different model (e.g., haiku)
  4. Observe window B — within 1-2 seconds, it also switches to haiku

Workaround

Launch with claude --model <model> to override per-session without writing to the settings file.

Environment

  • Claude Code (CLI)
  • Linux (Manjaro)
  • Two independent Konsole windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions