Status line shows global default model instead of per-session model
Description
When using multiple Claude Code instances (e.g., in different tmux panes), the status line displays the model from ~/.claude/settings.json rather than the actual model being used for each session. This causes all instances to show the same model in their status bar, even when they're actually using different models.
Steps to Reproduce
- Start Claude Code instance A with Opus (e.g.,
claude --model opus) - Start Claude Code instance B
- In instance B, run
/model sonnetto switch to Sonnet - Observe that instance A's status bar now shows "Sonnet" even though it's still using Opus
Expected Behavior
Each instance's status line should display the actual model being used for that session, regardless of what other instances are doing or what the global default is set to.
Actual Behavior
The status line JSON passed to the statusline command contains the model from settings.json (the global default), not the per-session model. When /model is used in one instance, it updates settings.json, causing all instances' status bars to show the new default.
Debug Information
The JSON passed to the statusline script shows:
"model": {
"id": "claude-sonnet-4-5-20250929[1m]",
"display_name": "Sonnet 4.5 (1M context)"
}
But querying the actual model in the session confirms it's running Opus 4.5 (claude-opus-4-5-20251101).
Environment
- Claude Code version: 2.1.31
- OS: macOS (Darwin 24.2.0)
- Status line: Custom script using
~/.claude/statusline-command.sh
Suggested Fix
The status line JSON's model field should reflect the session's actual model (set via --model flag at startup or /model command during the session), not the global default from settings.json.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗