Statusline model.id reflects global state, not per-session model

Resolved 💬 3 comments Opened Feb 20, 2026 by andreyz Closed Feb 20, 2026

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

  1. Open two Claude Code sessions (e.g., in separate terminal tabs)
  2. Both start with the same model (e.g., opus)
  3. In session A, run /model and switch to opus[1m]
  4. 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

View original on GitHub ↗

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