Statusline model data not updated after /model switch

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Feb 15, 2026 · closed Feb 15, 2026

Description

The statusline command receives stale model data after switching models mid-session with /model. The JSON input to the statusline script continues to report the original session model, not the newly selected one.

Steps to Reproduce

  1. Start a Claude Code session (defaults to Sonnet 4.5 in my case)
  2. Configure a custom statusline that displays model info:

``json
"statusLine": {
"type": "command",
"command": "jq -r '.model.id'"
}
``

  1. Run /model and switch to Opus
  2. Send a message to trigger a statusline refresh
  3. Observe the statusline still shows the previous model

Expected Behavior

After /model switch, the statusline JSON input should reflect the new model:

{
  "model": {
    "id": "claude-opus-4-6",
    "display_name": "Opus"
  }
}

Actual Behavior

The statusline JSON input still contains the pre-switch model:

{
  "model": {
    "id": "claude-sonnet-4-5-20250929",
    "display_name": "Sonnet 4.5"
  }
}

Confirmed by dumping the raw JSON stdin to a file — Claude Code is sending the stale data, not a statusline script bug.

Environment

  • Claude Code v1.0.34
  • macOS (Darwin 25.3.0)
  • Model switched from Sonnet 4.5 → Opus 4.6 via /model

View original on GitHub ↗

4 Comments

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/21121
  2. https://github.com/anthropics/claude-code/issues/20939
  3. https://github.com/anthropics/claude-code/issues/23659

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

jimmy-harden · 8 months ago

Confirming duplicate of #19570

BareTread · 8 months ago

+1 — Still reproducible on v2.1.44 (Linux). The root issue #19570 is marked stale despite having 5+ duplicates. This is a trust-breaking bug for anyone using custom statuslines: if the model field lies, the statusline becomes unreliable. Worth re-opening #19570 or at minimum removing the stale label.

github-actions[bot] · 7 months ago

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.