Statusline model.display_name not updating after /model command
Resolved 💬 3 comments Opened Jan 27, 2026 by Foodcoman Closed Jan 30, 2026
Description
After using the /model command to switch models mid-session (e.g., from Sonnet to Opus), the statusline model.display_name field in the JSON payload does not update. Other fields like context_window.current_usage DO update correctly.
Steps to Reproduce
- Start Claude Code (defaults to Sonnet 4.5)
- Configure a statusline command that displays the model name:
``json``
{
"statusLine": {
"type": "command",
"command": "/bin/bash ~/.claude/statusline-command.sh"
}
}
- Statusline correctly shows "Sonnet 4.5"
- Run
/modeland select Opus - Send a message to trigger statusline refresh
- Statusline still shows "Sonnet 4.5" (should show "Opus")
Expected Behavior
The model.display_name field in the JSON payload sent to the statusline command should reflect the current model after using /model to switch.
Actual Behavior
- Context percentage updates correctly (confirms JSON payload IS being refreshed)
- Model display_name remains at session-start value
- Model IS actually switched (responses come from new model)
- Only the statusline display is stale
Environment
- Claude Code version: 2.1.19
- macOS (Darwin 25.3.0)
- Statusline script extracts model via:
jq -r '.model.display_name'
Screenshot
Statusline shows "Sonnet 4.5" after switching to Opus:
- Context bar updates (31%)
- Model name does not update
Workaround
Starting a new session shows the correct model, but /model mid-session doesn't update the statusline.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗