Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.251 ·

/model switches can be blocked or held for confirmation by a hook

A PreModelSwitch hook can block or hold your /model change for confirmation.

Use it now Notable New Features
JSON All of v2.1.251
Use it nowTier: how much it should matter to you
4Useful: my rating, 1 to 5
4Signal: worth watching, 1 to 5
HooksArea: what it touches
New FeaturesKind: in v2.1.251,
What probably matters to youSection of the release
What

Running /model with a model name now consults any registered model-switch hooks before the model changes. A hook can block the switch outright, in which case you see "model switch blocked by a PreModelSwitch hook" and are told to run /model to confirm, or it can answer "ask", which leaves the model unchanged and directs you to /model interactively. Hooks can also attach their own messages to the confirmation, so a switch that needs a second look explains why instead of failing silently.

Details
  • Only engaged when model-switch hooks are registered by the caller; with none registered, switching behaves exactly as before.
  • A hook answering "ask" changes nothing and defers to the interactive /model picker.
  • The check on whether a model is available now gives up and reports "Couldn't confirm model '" rather than hanging indefinitely when it stalls.
Evidence

Couldn't confirm model ', model switch blocked by a PreModelSwitch hook

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Read from
Names in the bundle/modelPreModelSwitch
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up PreModelSwitch, on Hooks reference. | PreModelSwitch | `hookSpecificOutput` or top-level `decision` | `permissionDecision` (allow/deny/ask), `permissionDecisionReason`. `decision: "block"` also [cancels the switch](#premodelswitch-decision-control) | hooks see the edit
Confirmed since Anthropic's documentation has since written up /model, on All settings. Cap the [effort level](/docs/en/model-config#adjust-effort-level) a session can use, leaving lower levels available. Any higher level runs at the cap instead, including one from `/effort`, the `/model` picker, `--effort`, [`CLAUDE_CODE_EFF… settings-reference see the edit
Added since A small documentation edit on Agent SDK reference - TypeScript touched a line naming /model after this was published. `effortLevel` accepts an [effort level](/docs/en/model-config#adjust-effort-level) name. It also accepts `"ultracode"`, which requests `xhigh` effort with [ultracode](/docs/en/workflows#let-claude-decide-with-ultracode) on. `applyFlagSetti… agent-sdk/typescript see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesA small documentation edit on Agent SDK reference - TypeScript touched a line naming /model after this was published.
Anthropic's release notes agreeAdded PreModelSwitch and PostModelSwitch hook events (block, confirm, or annotate a model switch); SessionStart resume hooks now receive…

See this entry in the whole of v2.1.251 →

Feedback