[BUG] VS Code sidebar model badge shows Haiku while /model reports Sonnet 5, blocking Auto mode

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 31, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description

In the VS Code extension sidebar (native UI, not terminal mode), opening a new session shows "Haiku" in the model selector badge/dropdown, even though the session's actual active model is Sonnet 5. This mismatch causes Auto mode to be unavailable/greyed out (Auto mode requires Sonnet/Opus tier).

Environment

  • Extension: anthropic.claude-code 2.1.220 (linux-x64)
  • Connection: VS Code Remote-SSH
  • Model set via: claudeCode.environmentVariables in Remote Machine settings.json → ANTHROPIC_MODEL=claude-sonnet-5

Steps to reproduce

  1. Set claudeCode.environmentVariables to [{"name": "ANTHROPIC_MODEL", "value": "claude-sonnet-5"}] in the Remote-SSH Machine settings.json.
  2. Reload the VS Code window.
  3. Open a new Claude Code session in the sidebar.
  4. Observe the model badge/dropdown shows "Haiku".
  5. Run /model in that same session.

Expected behavior

The model badge should match what /model reports, and Auto mode should be available since the active model is Sonnet 5.

Actual behavior

  • Model badge/dropdown: shows "Haiku"
  • /model output: Current model: Sonnet 5 (effort: high)
  • Auto mode option is not selectable, presumably because the UI's (incorrect) badge state says Haiku.

Additional notes

  • No claudeCode.defaultModel setting exists in the extension's contributed configuration (checked package.json for v2.1.220) — only claudeCode.environmentVariables is available to influence model at launch.
  • Confirmed via env | grep ANTHROPIC_MODEL that the correct env var reaches the spawned process.
  • This appears distinct from #43235/#42648 (Auto mode disabled because the model really is Haiku) and #36478 (model config not loading, closed as not planned) — here the backend model is confirmed correct, only the UI badge/Auto-mode gating is out of sync.

What Should Happen?

The model badge/dropdown in the sidebar should reflect the session's actual active model. Since ANTHROPIC_MODEL=claude-sonnet-5 is set and /model confirms "Current model: Sonnet 5 (effort: high)", the badge should show "Sonnet 5", not "Haiku" — and Auto mode should be selectable, since Auto mode is supported on Sonnet 5.

Error Messages/Logs

Steps to Reproduce

  1. In VS Code Remote-SSH, set the following in the Machine settings.json:

"claudeCode.environmentVariables": [
{ "name": "ANTHROPIC_MODEL", "value": "claude-sonnet-5" }
]

  1. Reload the VS Code window (Developer: Reload Window).
  2. Open a new Claude Code session (New session) in the sidebar.
  3. Observe that the model badge/dropdown shows "Haiku".
  4. Run /model in that same session.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.220

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Non-interactive/CI environment

Additional Information

_No response_

View original on GitHub ↗