claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Status bar shows incorrect model name (Opus 4.1 instead of Sonnet 4.5)

Open dylan-grow opened this issue 2 months ago • 2 comments

Note: This issue was created by Claude Code on behalf of a user.

The status bar is displaying "Opus 4.1" when the actual model being used is Sonnet 4.5 (claude-sonnet-4-5-20250929).

Environment:

  • Platform: macOS (Darwin 24.6.0)
  • Date: 2025-10-07
  • Claude Code version: 2.0.9 (inferred from changelog)

Steps to reproduce:

  1. Use Claude Code with the default model (Sonnet 4.5)
  2. Check the status bar - it shows "Opus 4.1"
  3. Run /model command - it correctly shows "claude-sonnet-4-5-20250929"

Expected behavior: Status bar should display the correct model name matching what /model shows.

Actual behavior: Status bar shows "Opus 4.1" even though Sonnet 4.5 is being used.

Technical details: The status bar script reads model information from the JSON input provided by Claude Code (specifically model.display_name field as documented at https://docs.claude.com/en/docs/claude-code/statusline). It appears that Claude Code is passing incorrect values in this field - likely showing model information from the settings configuration rather than the currently active model.

User's configuration:

{
  "model": "opus",
  "statusLine": {
    "type": "command",
    "command": "input=$(cat); cwd=$(echo \"$input\" | jq -r '.workspace.current_dir'); model=$(echo \"$input\" | jq -r '.model.display_name'); cost=$(echo \"$input\" | jq -r '.cost.total_cost_usd' | awk '{printf \"%.2f\", $1}'); timestamp=$(date +\"%-l:%M:%S\"); dir_name=$(basename \"$cwd\"); git_branch=\"\"; if git -C \"$cwd\" rev-parse --git-dir > /dev/null 2>&1; then branch=$(git -C \"$cwd\" branch --show-current 2>/dev/null || git -C \"$cwd\" rev-parse --short HEAD 2>/dev/null); if [ -n \"$branch\" ]; then if \! git -C \"$cwd\" diff --quiet 2>/dev/null || \! git -C \"$cwd\" diff --cached --quiet 2>/dev/null; then git_branch=\" ⎇ $branch ±\"; else git_branch=\" ⎇ $branch\"; fi; fi; fi; printf \"\\033[33m[%s]\\033[0m \\033[36m%s\\033[0m\\033[32m%s\\033[0m \\033[35m%s\\033[0m \\033[38;5;216m\\$%s\\033[0m\" \"$timestamp\" \"$dir_name\" \"$git_branch\" \"$model\" \"$cost\""
  },
  "alwaysThinkingEnabled": true
}

Hypothesis: The user has "model": "opus" in their settings, but when they run /model it shows they're actually using Sonnet 4.5. It appears that the JSON input passed to the statusline script contains model.display_name based on the settings file configuration rather than the actual active model being used in the conversation.

Impact: The incorrect display doesn't affect functionality - the correct model is actually being used for all interactions. This is purely a display bug in the status bar, but it's confusing for users who rely on the status bar to know which model they're using.

dylan-grow avatar Oct 07 '25 21:10 dylan-grow

I actually think this might be a symptom of a real issue where it's sometimes using the wrong model, especially when you've got multiple sessions running on the same machine but each one using different models.

I've had a number of instances where /model shows I'm on Default but then I get the yellow popup saying "Claude Opus limit reached, now using Sonnet", as if it's actually been using Opus instead?

Similarly I've been occasionally using 1m Sonnet for brief activities (often just to compact a session that's too long to compact) but then a little while later notice my usage has suddenly been smashed. I know everyone says that though, so it's hard to be sure.

I didn't know the status line could be customised in this way so I've turned it on now to see if I can catch it showing a different model to the configuration like this issue reports, and then try to determine if it's really using the wrong model!

andrewleech avatar Nov 07 '25 03:11 andrewleech

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 11 '25 10:12 github-actions[bot]