which-model guide · checked
Is Claude Code switching my model?
It can, and the transcripts on your machine record it: Claude Code writes the model that answered on every response, and a notice when it moves a session to another model. What you do not get from Claude Code is the history: how often it happened, on which days and client versions, and how many responses the other model served before the session came back. npx --allow-git=root github:agentwares/which-model reads that from the transcripts already in ~/.claude/projects, lists every switch in a session's main thread with what was recorded just before it, and sends nothing.
What the transcript records
| Field | What it tells you |
|---|---|
| message.model on each response | the model that answered that response |
| a fallback notice (a system line) | the requested model, the model it moved to, and when |
| your /model output, "Set model to …" | a model you picked, and when |
| isSidechain and agentId | a subagent's response, which runs on its own model by design |
| version on every line | the Claude Code version that wrote it |
The method
A switch is two consecutive responses in one session's main thread answered by different models. Subagents are left out, because they run on their own models by design. Each switch is labelled by what the transcript records between the two responses:
| Recorded before it | What that means |
|---|---|
| your /model | you picked the model; counted, never listed as a finding |
| a fallback notice | the client itself wrote that it moved the session to another model |
| a client relaunch | the session continued on another Claude Code version |
| nothing | no /model, no notice, same version: not proof of a reroute, since a model picked in a way the transcript does not record looks the same |
For each switch it gives the date, the two models, the client version, and how many responses and hours the new model then served. Once a requested model is recorded (your /model, or a notice's original model), it also counts the responses answered by a different one.
$ npx --allow-git=root github:agentwares/which-model
Served-model switches nothing you did explains (Claude Code, main thread): 2 in 1 session
16 Jul 02:42 session 63c29f12 Claude Code 2.1.197
claude-fable-5 → claude-opus-4-8 after a fallback notice the client recorded (claude-fable-5 →
claude-opus-4-8, trigger: refusal); served 308 responses over 21.5 h, until the next switch.
17 Jul 00:15 session 63c29f12 Claude Code 2.1.197
claude-opus-4-8 → claude-fable-5 with nothing recorded before it (no /model, no fallback notice,
same client version); served 12 responses over 0.8 h, to the end of the session.
Not listed: 1 after your own /model.
Answered by a different model than the one last recorded as requested: 308 responses in 1 session.What Claude Code shows, as of 8 October 2026
The docs say a session can fall back to another model and that a notice names both models when it does. The changelog shows the notice still changing: 2.1.285 fixed /cost reporting a turn under the wrong model after a fallback, and 2.1.286 made the notice say when a fallback dropped the context window from 1M to 200K tokens. There is no documented label of the answering model on each response and nothing that counts a session's time on the other model; that is what #78888 asks for.
What people reported
In #78888 (18 July 2026) a user found from the per-message model field that one session was served by claude-opus-4-8 for about 840 messages over about 23 hours while the interface still showed Fable 5. #83510 (3 August 2026) reports under-disclosed fallback from Fable 5 to Opus 4.8 alongside measured quality changes. Both were found by hand, from the same fields which-model reads.
What it cannot tell you
It sees your machine, not Anthropic's servers, so it never says why a switch happened. A switch with nothing recorded before it may be a model you picked in a way the transcript does not record. And it cannot do the same for Codex: Codex records the model it requested, not the one that answered.
Run it
npx --allow-git=root github:agentwares/which-model for every switch; npx --allow-git=root github:agentwares/which-model --session <id> for one session in order; --json for all of it.
$ npx --allow-git=root github:agentwares/which-modelFree and MIT. It reads the transcripts on this machine, makes no network request and sends nothing. Its output holds model ids, versions, dates, counts and session ids, never a prompt, a path or a project name, so you can paste it into an issue.
For a team
seatledger's team ledger shows the whole team's model mix today, by model and by day: seatledger. A team alert when the served model changes does not exist yet; one click tells us you would use it.
Tell me when there is a team alert for served-model changesSources
- Claude Code docs: Model configuration — read 8 October 2026: a session can fall back to another model, with a notice naming both
- Claude Code CHANGELOG — read 8 October 2026 at 2.1.294: the fallback-notice entries quoted on this page, by version
- anthropics/claude-code#78888 — a session served by claude-opus-4-8 instead of claude-fable-5 for about 840 messages over about 23 hours, opened 18 July 2026; open with 20 👍 on 8 October 2026
- anthropics/claude-code#83510 — measured quality regression including under-disclosed fallback from Fable 5 to Opus 4.8, opened 3 August 2026; open with 21 👍 on 8 October 2026
- anthropics/claude-code#68780 — reasoning degradation on Opus 4.8 and 5, opened 16 June 2026, closed 24 September 2026; 35 👍 on 8 October 2026