[BUG] statusline script isn't being updated to reflect the new active model

Resolved 💬 3 comments Opened Aug 12, 2025 by kenhaberle Closed Dec 3, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [X] Other: Claude Code
  • Claude CLI version: 1.0.73 (Claude Code)
  • Operating System: Windows 11
  • Terminal: PowerShell 7.5.2

Bug Description

In statusline I am trying to have it display the current model. The issue is that when Claude Code automatically switches models due to usage limits, the model information passed to your statusline script isn't being updated to reflect the new active model. Your statusline script is working correctly - it's just receiving outdated model information from Claude Code itself.

Steps to Reproduce

  1. I this command in Claude Code: /statusline show the model name in orange with current directory and current time as EST
  2. After a little back and forth I was able to get the color working properly.
  3. The model just stays on Opus. Even when I start up and it says I have reached my Opus limit using Sonnet 4.

Expected Behavior

I was expecting the model to change when I flipped over the sonnet.

Actual Behavior

It just stays on Opus

Additional Context

<img width="593" height="74" alt="Image" src="https://github.com/user-attachments/assets/fe669cf6-61fc-4674-bfd9-583ddaf85c9c" />

View original on GitHub ↗

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