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.238 ·

Hooks can be replaced by sending initialize again

A stream-json host can send initialize again to swap out its hooks mid-session.

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

In stream-json input mode, hooks are no longer fixed at first connect. The process that owns the stdin stream can send a second initialize whose hooks replace the earlier set, and the reply's hooks_applied says whether that took effect.

Details
  • The documented schema for stdin was changed to drop hooks from the list of one-time session setup.
  • A new internal call retires outstanding SDK host hook callbacks: any hook_callback request still in flight is cancelled and answered with a supplied fallback rather than left hanging.
Evidence

hooks sent by the process that owns this stream replace the earlier set (see hooks_applied on the response)

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

Read from
Names in the bundleinitializehooks_applied
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.

Added since A small documentation edit on Agent SDK reference - TypeScript touched a line naming initialize after this was published. * `true`: Claude Code registered the hooks. A session's first initialize returns this value. A repeated initialize sent over the CLI's stdin also returns `true`. In that case the hooks in the new request replace the hooks registered earlie… agent-sdk/typescript see the edit
Confirmed since Anthropic's documentation has since written up initialize, on Credentials. The MCP method that failed (for example `initialize` or `tools/list`). api/beta/vaults/credentials 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 initialize, on Credentials.

See this entry in the whole of v2.1.238 →

Feedback