Status line JSON reports wrong model after /model switch
Status Fixed / completed
Reported on v2.1.78
Maintainer reply ✓ Yes — ashwin-ant
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Mar 28, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Bug
After switching model via /model (e.g. selecting Opus 4.6), the status line JSON input still reports the previous model (Sonnet 4.6). The model.id and model.display_name fields in the JSON payload sent to the status line command do not reflect the currently selected model.
Steps to reproduce
- Start Claude Code (defaults to Sonnet 4.6)
- Run
/modeland select Opus 4.6 - Observe status line still shows Sonnet 4.6
Debug output
Dumped the raw JSON received by the status line command to a file. Result:
{
"model": {
"id": "claude-sonnet-4-6",
"display_name": "Sonnet 4.6"
}
}
The conversation itself confirms Opus 4.6 is active (system prompt says claude-opus-4-6), but the status line JSON still reports Sonnet.
Expected behavior
model.id and model.display_name in the status line JSON should reflect the model currently in use after a /model switch.
Environment
- Claude Code version: 2.1.78
- OS: macOS (Darwin 25.2.0)
- Shell: zsh
4 Comments
Fixed in v2.1.85. I verified on 3/27 that after
/modelswitch, the stdin JSON correctly reports the newmodel.idanddisplay_name. Updating from 2.1.78 should resolve it.A UserPromptSubmit hook can track model switches and provide the correct model to statusline:
Note: this is a partial workaround — the real fix needs the status line JSON to reflect the actual current model after
/modelswitches.This was fixed in v2.1.86 — The status line JSON now reports the correct model immediately after switching with /model. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.