[BUG] VS Code extension drops Auto from the mode picker when user-settings model is an alias absent from the models list (e.g. "opus") — availability stuck at "unknown"
Edited 2026-08-29: the original report blamed a regression in 2.1.251. That was wrong — further tracing shows the same code in 2.1.250 and 2.1.251, and the real trigger is a startup race combined with a user-settingsmodelalias that the webview cannot resolve. Title, description and repro rewritten accordingly; theregressionlabel no longer applies.
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?
Symptom, precisely: a conversation starts in Auto (account default), and Auto is listed in the picker only while the conversation is in Auto. Switch to Manual (or Edit automatically / Plan) and open the picker again: Auto is gone and cannot be selected again. Same in resumed and brand-new conversations. Conversations resumed in acceptEdits (last picked mode) therefore never show Auto at all — which is how it first looked like "Auto disappeared".
The bundled CLI approves auto mode for the same session:
[auto-mode] verifyAutoModeGateAccess: enabledState=enabled disabledBySettings=false model=claude-sonnet-5 modelSupported=true carouselAvailable=true canEnterAuto=true
and claude -p ... --output-format stream-json from the same binary starts with "permissionMode":"auto".
Root cause (traced in webview/index.js and extension.js; 2.1.250 and 2.1.251 behave the same):
- The picker adds
autowhenautoModeAvailability === "available", or when it is"unknown"and the current mode is alreadyauto— which is exactly the observed "only while in Auto" behaviour."unknown"is returned whencurrentModelInfoisundefined. currentModelInfolooksmodelSelectionup inclaudeConfig.modelsbyvalue/resolvedModel.modelSelectionis set once per conversation, at launch, fromconfig.modelSetting, which the host computes ascachedClaudeSettings?.effective?.model ?? cachedUserSettings?.model ?? "default".cachedClaudeSettingsis only populated after the config probe (Loading config cache by launching Claude (no channel)..., several seconds). A conversation launched before that falls back tocachedUserSettings.model, i.e. the rawmodelvalue from~/.claude/settings.json.- For this account the
initializeresponse listsmodelsasdefault(→ claude-opus-5[1m]),opus[1m],claude-fable-5[1m],sonnet,haiku. There is no plainopusentry, while the CLI itself resolves--model opustoclaude-opus-5. With"model": "opus"in user settings the lookup fails →"unknown"for the whole life of that conversation.
There is also a benign, transient form of the same state: right after the window opens, before the config (models list) reaches the webview, opening the picker shows no Auto; a few seconds later (once the "Remote Control is active" banner appears) it does. With an unresolvable alias the state never recovers.
What Should Happen?
Auto should be listed whenever the CLI reports canEnterAuto=true, regardless of the current mode. Concretely: resolve model aliases the way the CLI does (opus, sonnet, haiku, ...), or don't key modelSelection on the raw user-settings value before effective settings are known, and don't leave availability at "unknown" once the gate and the disable checks have passed.
Error Messages/Logs
Controlled A-B-A on the same machine, extension 2.1.251, project `.claude/settings.local.json` pins `sonnet`, only `~/.claude/settings.json` `model` changed; after each change: Developer: Reload Window, wait 20 s, then in both the resumed and a new conversation switch Auto → Manual and open the picker:
| user-settings `model` | in models list? | Auto after leaving Auto |
|---|---|---|
| "opus[1m]" | yes | listed (resumed and new) |
| "opus" | no | gone (resumed and new) |
| "opus[1m]" | yes | listed (resumed and new) |
Extension output log (%APPDATA%\Code\logs\<session>\window1\exthost\Anthropic.claude-code\Claude VSCode.log), a failing session:
09:58:56.698 Received message from webview: {"type":"get_claude_state"}
09:58:57.409 Loading config cache by launching Claude (no channel)...
09:59:00.181 Received message from webview: {"type":"launch_claude", ..., "resume":"<id>", "permissionMode":"acceptEdits"} <- launched before the probe finished
09:59:06.546 From claude: [auto-mode] verifyAutoModeGateAccess: enabledState=enabled disabledBySettings=false model=claude-sonnet-5 modelSupported=true disableFastModeBreakerFires=false carouselAvailable=true canEnterAuto=true
`initialize` control response (models), bundled binary 2.1.250 and 2.1.251, this account:
{"value":"default","resolvedModel":"claude-opus-5[1m]","supportsAutoMode":true}
{"value":"opus[1m]","resolvedModel":"claude-opus-5[1m]","supportsAutoMode":true}
{"value":"claude-fable-5[1m]","resolvedModel":"claude-fable-5","supportsAutoMode":true}
{"value":"sonnet","resolvedModel":"claude-sonnet-5","supportsAutoMode":true}
{"value":"haiku","resolvedModel":"claude-haiku-4-5-20251001"}
`get_settings` → effective.model = "sonnet" (project-local); sources[userSettings].model = "opus".
`claude -p --model opus` → init.model = claude-opus-5; `--model default` → claude-opus-5[1m].
Steps to Reproduce
- Claude Max account, Anthropic API, Windows, VS Code extension 2.1.251 (2.1.250 behaves the same). Put
"model": "opus"in~/.claude/settings.json(the account's models list hasopus[1m]but noopus). - Developer: Reload Window; the last conversation is resumed within ~3 s, i.e. before
Loading config cache...completes. - The conversation starts in Auto. Switch to Manual, open the picker: Manual / Edit automatically / Plan only — Auto cannot be re-selected. Same in a new conversation. Output log still shows
canEnterAuto=true. - Control: change user settings
modelto"opus[1m]"(or"default","sonnet"), reload, repeat step 3 → Auto stays listed after switching to Manual, in both conversations. Switch back to"opus"→ gone again.
Claude Model
Sonnet (default)
Is this a regression?
I don't know — not version-related (see steps: same build shows Auto or not depending on launch timing and the user-settings model value)
Last Working Version
Not version-related (A-B-A above on a single build). First noticed 2026-08-29.
Claude Code Version
Extension 2.1.251 (bundled native claude.exe 2.1.251); also reproduced on 2.1.250; VS Code 1.135.0; Windows 11 Pro 10.0.26200.9168
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
- Claude Desktop app (Code tab), same account: Auto is offered normally (it doesn't share this lookup).
- Earlier reports with the same symptom and the same
canEnterAuto=truecontradiction, all closed without a documented cause: #60086 (2.1.143), #44941 (2.1.94, Windows), #61282 (2.1.145, Linux). The mechanism above would explain them whenever the reporter's user-settingsmodelwas an alias not present in their account's models list. - Workaround: set user-settings
modelto a value that exists in the models list (opus[1m],default,sonnet).