Skip to content

Claude agent host: model picker shows the first native model (Fable) after restart, while turns still run on the saved model #337653

Open

Agent suggestions

Public preview

Description

  • VS Code Version: 1.139.0 (also seen on 1.138.0)
  • OS Version: macOS 27.0 (arm64)
  • Harness: Claude agent host, native Anthropic auth (CLAUDE_CODE_OAUTH_TOKEN), Agents window

Steps to reproduce

  1. In a Claude agent host session, pick Opus in the model picker and send a message.
  2. Quit VS Code and reopen it.
  3. 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).

Activity

  1. mmontagnana commented on Sep 26, 2026

    @mmontagnana

    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.

  2. mmontagnana commented on Sep 26, 2026

    @mmontagnana

    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.

  3. mmontagnana commented on Sep 28, 2026

    @mmontagnana

    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.

  4. mmontagnana commented on Sep 30, 2026

    @mmontagnana

    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:

    1. 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.
    2. Selection and executed model disagree even after the fallback: persisted selection claude-fable-5-1[1m], executed turns plain claude-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.
    3. 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.

  5. mmontagnana commented on Sep 30, 2026

    @mmontagnana

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions