Statusline model.id reflects global state, not per-session model
Description
The model.id field in the statusline JSON input reflects the last model selected across any session, not the current session's active model. When running multiple Claude Code instances in parallel and switching models via /model in one session, the statusline in all other sessions updates in real-time to show the newly selected model — even though those sessions are still using their original model.
Steps to Reproduce
- Open two Claude Code sessions (e.g., in separate terminal tabs)
- Both start with the same model (e.g.,
opus) - In session A, run
/modeland switch toopus[1m] - Observe session B's statusline — it now also shows
opus[1m]
Expected Behavior
Each session's statusline should reflect that session's active model. Session B should continue showing opus since its model was not changed.
Actual Behavior
All sessions show the last model selected in any session. The model.id in the statusline JSON payload appears to be read from a shared global location rather than per-session state.
Impact
Custom statuslines that display the current model (a documented use case) show misleading information when running parallel sessions with different models. There's no workaround on the statusline command side since it can only read what Claude Code provides.
Environment
- Claude Code (latest)
- macOS
- Multiple concurrent sessions via separate terminal instances
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗