You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Claude agent host: model picker shows the first native model (Fable) after restart, while turns still run on the saved model #337653
Harness: Claude agent host, native Anthropic auth (CLAUDE_CODE_OAUTH_TOKEN), Agents window
Steps to reproduce
In a Claude agent host session, pick Opus in the model picker and send a message.
Quit VS Code and reopen it.
Open the same session.
Expected: the picker shows Opus.
Actual: the picker shows Fable, the first native model.
What is actually used
Routing is correct; only the label is wrong. A message sent while the picker showed Fable was answered by claude-opus-5 on every assistant turn (session transcript and turn_usage in agentSessionData/<id>/session.db).
The saved selection is Opus everywhere I could find:
session_metadata.claude.model {"id":"@provider=anthropic:opus","config":{"thinkingLevel":"high"}}
defaultChatProviderData same
chat.modelConfiguration.panel.agent-host-claude {"agent-host-claude:@provider=anthropic:opus":{}}
chatModelRecentlyUsed[0] agent-host-claude:@provider=anthropic:opus
This looks like a startup race: the restored session resolves the saved model id before the agent host has published the native model list (native models load after an async SDK supportedModels() call), falls back to the first entry, and the label is not re-resolved once the list arrives.
Because the label and the actual model disagree, users can think they are on a different model than the one billing their plan.
Possibly related: #314211 (picker reverting to Auto in the Agents window, Copilot models).
Same setup here (macOS arm64, Claude agent host, native auth via CLAUDE_CODE_OAUTH_TOKEN), reproduced on two VS Code releases: 1.138 and 1.139.1. In my case the model actually changes, not just the label. I never select Fable manually.
Checking model on assistant messages in ~/.claude/projects/*/<session>.jsonl, across three sessions the first turn after reopening VS Code the next morning ran on claude-fable-5, after the previous day's turns had run on claude-opus-5:
session A (VS Code 1.138): last Opus turn 09-16 18:16 → next turn 09-17 14:27 on claude-fable-5
session B (VS Code 1.138): last Opus turn 09-21 18:18 → next turn 09-22 09:31 on claude-fable-5
session C (VS Code 1.139.1): last Opus turn 09-24 16:39 → next turn 09-25 09:33 on claude-fable-5
Re-selecting Opus in the picker switches it back. So at least on some runs the fallback to the first native model reaches the SDK, not just the UI, which makes this a billing/quality issue as well.
Follow-up with the full history (times CEST, from timestamp/version of main-thread assistant messages in ~/.claude/projects/*/*.jsonl, all entrypoint: sdk-ts). Every Fable turn I have — I never select Fable:
start
turns
SDK
previous turn
09-02 22:53
2
0.3.239
— (new session)
09-03 22:34
20
0.3.239
opus-5, 22:29
09-09 09:20
33
0.3.239
opus-5, 09-08 18:33
09-09 09:58
62
0.3.239
— (new session)
09-17 14:27
338
0.3.258
opus-5, 09-16 18:16
09-17 20:16
15
0.3.258
opus-5, 20:10
09-22 09:31
5
0.3.258
opus-5, 09-21 18:18
09-24 11:20
12
0.3.258
— (new session)
09-25 09:33
6
0.3.258
opus-5, 09-24 16:39
So it has happened since 1.136 (the first release where I used Claude from the Chat view), with both SDK versions pinned by VS Code (installed via the workaround in #334077). All turns are claude-fable-5, not 5.1, while the first native row here is claude-fable-5-1[1m] — likely this fallback combined with #334750.
Since then I only see the label-only variant described in this issue, in two setups: 1.139.1 with a manually placed SDK 0.3.282 (no Fable turns since 09-25 afternoon), and 1.140.0-insider with the default SDK 0.3.258. In both I sent a turn while the picker showed Fable and it ran on the saved Opus. Given the frequency above (every 1–3 days), that's not yet evidence of a fix.
Startup sequence on 1.139.1, before touching anything: Local – Agent – Auto – Balanced → Agent – No models available → Agent – Fable – High. Switching to another chat and back shows Agent – Opus – High; the saved claude.model in session.db is @provider=anthropic:opus throughout.
Still present on 1.140.0-insider with Claude SDK 0.3.281 (auto-installed): after the update/restart the picker shows Fable, the turn runs on the saved Opus (claude-opus-5-5).
The real-switch variant is back — and this time with a new twist: the fallback overwrote the saved selection.
Today's sequence (times CEST; VS Code 1.139.1 stable with manually placed SDK 0.3.282, transcript version: 2.1.282, entrypoint: sdk-ts):
time
event
09:19
last turn on claude-opus-5-5 (selection had been Opus for days)
09:57:07
VS Code restart (first line in the Git Output channel)
10:03:58
first message after restart → runs on claude-fable-5; 28 consecutive turns since, no manual model change
New findings vs my previous comments:
The fallback is now persisted.session_metadata.claude.model in session.db no longer holds Opus; it reads {"id":"@provider=anthropic:claude-fable-5-1%5B1m%5D","config":{"thinkingLevel":"high"}} — the first native row. Accordingly, switching to another chat and back no longer restores the Opus label (it did in the label-only variant): the stored selection itself was overwritten. In all my earlier reports it had stayed @provider=anthropic:opus throughout.
Internally inconsistent per-message label. The last message's indicator showed Fable (claude-opus-5-5) — a combination that doesn't exist. The display name comes from the (fallen-back) picker state; the id apparently from usage data, which is itself wrong: turn_usage in session.db does record those turns, but as claude-opus-5-5 (4 rows added after Fable turns, all labeled Opus), while the transcript says they ran on claude-fable-5. So usage records report the saved model, not the executed one — and both halves of the label are wrong, in different ways.
Update: re-selecting Opus in the picker restored claude.model to @provider=anthropic:opus and the next turn ran on claude-opus-5-5. Before that I deliberately stayed on the fallen-back model for ~45 minutes and several turns: nothing changed on its own, so the switch only happens at restart and then sticks.
One more observation: the per-message model indicator is not stored per turn — it's re-derived at render time.
After re-selecting Opus, every message that ran on claude-fable-5 (per transcript) now shows Opus (claude-opus-5-5) — including the very first turn after the restart (10:05 CEST). While the picker was still on the fallen-back model, the same kind of message showed Fable (claude-opus-5-5). The name comes from the current picker state, the id from turn_usage (which records the saved model, see above).
Net effect: the UI retroactively rewrites which model answered. Once the selection is corrected, there is no in-product way to tell that ~45 minutes of turns ran on a different model than the one selected; the only trace left is the transcript .jsonl.
Activity
mmontagnana commentedon Sep 26, 2026
Same setup here (macOS arm64, Claude agent host, native auth via
CLAUDE_CODE_OAUTH_TOKEN), reproduced on two VS Code releases: 1.138 and 1.139.1. In my case the model actually changes, not just the label. I never select Fable manually.Checking
modelon assistant messages in~/.claude/projects/*/<session>.jsonl, across three sessions the first turn after reopening VS Code the next morning ran onclaude-fable-5, after the previous day's turns had run onclaude-opus-5:claude-fable-5claude-fable-5claude-fable-5Re-selecting Opus in the picker switches it back. So at least on some runs the fallback to the first native model reaches the SDK, not just the UI, which makes this a billing/quality issue as well.
mmontagnana commentedon Sep 26, 2026
Follow-up with the full history (times CEST, from
timestamp/versionof main-thread assistant messages in~/.claude/projects/*/*.jsonl, allentrypoint: sdk-ts). Every Fable turn I have — I never select Fable:So it has happened since 1.136 (the first release where I used Claude from the Chat view), with both SDK versions pinned by VS Code (installed via the workaround in #334077). All turns are
claude-fable-5, not 5.1, while the first native row here isclaude-fable-5-1[1m]— likely this fallback combined with #334750.Since then I only see the label-only variant described in this issue, in two setups: 1.139.1 with a manually placed SDK 0.3.282 (no Fable turns since 09-25 afternoon), and 1.140.0-insider with the default SDK 0.3.258. In both I sent a turn while the picker showed Fable and it ran on the saved Opus. Given the frequency above (every 1–3 days), that's not yet evidence of a fix.
Startup sequence on 1.139.1, before touching anything: Local – Agent – Auto – Balanced → Agent – No models available → Agent – Fable – High. Switching to another chat and back shows Agent – Opus – High; the saved
claude.modelinsession.dbis@provider=anthropic:opusthroughout.mmontagnana commentedon Sep 28, 2026
Still present on 1.140.0-insider with Claude SDK 0.3.281 (auto-installed): after the update/restart the picker shows Fable, the turn runs on the saved Opus (
claude-opus-5-5).Label-only in this setup.
mmontagnana commentedon Sep 30, 2026
The real-switch variant is back — and this time with a new twist: the fallback overwrote the saved selection.
Today's sequence (times CEST; VS Code 1.139.1 stable with manually placed SDK 0.3.282, transcript
version: 2.1.282,entrypoint: sdk-ts):claude-opus-5-5(selection had been Opus for days)claude-fable-5; 28 consecutive turns since, no manual model changeNew findings vs my previous comments:
session_metadata.claude.modelinsession.dbno longer holds Opus; it reads{"id":"@provider=anthropic:claude-fable-5-1%5B1m%5D","config":{"thinkingLevel":"high"}}— the first native row. Accordingly, switching to another chat and back no longer restores the Opus label (it did in the label-only variant): the stored selection itself was overwritten. In all my earlier reports it had stayed@provider=anthropic:opusthroughout.claude-fable-5-1[1m], executed turns plainclaude-fable-5— further support for the Agent host Claude harness: toSdkModelId turns claude-fable-5-1[1m] into claude-fable-5 (native "Fable" row runs Fable 5 instead of 5.1) #334750 connection.Fable (claude-opus-5-5)— a combination that doesn't exist. The display name comes from the (fallen-back) picker state; the id apparently from usage data, which is itself wrong:turn_usageinsession.dbdoes record those turns, but asclaude-opus-5-5(4 rows added after Fable turns, all labeled Opus), while the transcript says they ran onclaude-fable-5. So usage records report the saved model, not the executed one — and both halves of the label are wrong, in different ways.Update: re-selecting Opus in the picker restored
claude.modelto@provider=anthropic:opusand the next turn ran onclaude-opus-5-5. Before that I deliberately stayed on the fallen-back model for ~45 minutes and several turns: nothing changed on its own, so the switch only happens at restart and then sticks.mmontagnana commentedon Sep 30, 2026
One more observation: the per-message model indicator is not stored per turn — it's re-derived at render time.
After re-selecting Opus, every message that ran on
claude-fable-5(per transcript) now showsOpus (claude-opus-5-5)— including the very first turn after the restart (10:05 CEST). While the picker was still on the fallen-back model, the same kind of message showedFable (claude-opus-5-5). The name comes from the current picker state, the id fromturn_usage(which records the saved model, see above).Net effect: the UI retroactively rewrites which model answered. Once the selection is corrected, there is no in-product way to tell that ~45 minutes of turns ran on a different model than the one selected; the only trace left is the transcript
.jsonl.