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 ·

SDK set_model waits for a busy session instead of failing

SDK set_model now waits for a busy session and applies once idle instead of failing.

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

The SDK set_model control request is now asynchronous. If the session is busy or has queued work, the model change is deferred and applied once the session goes idle rather than being forced through. Any notices the change produces are forwarded back to the caller, and a thrown error now replies set_model failed instead of leaving the request hanging.

Details
  • Applies to every set_model control request; there is no flag.
Evidence

`if (u0(e) || Ek.of(e).pending > 0) lt(() => ng(e, O));

else await O();`

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

Read from
Names in the bundleset_model
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 set_model, on Agent SDK reference - Python. | `set_model(model)` | Change the model for the current session. Pass `None` to reset to [Claude Code's default model](/docs/en/model-config) | agent-sdk/python see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up set_model, on Agent SDK reference - Python.

See this entry in the whole of v2.1.251 →

Feedback