Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.238 Home All releases olderv2.1.237 v2.1.239newer
Claude Code v2.1.238

Hooks can be replaced by sending initialize again

Use it now
Useful3 Signal3
Hooks Notable

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

initializehooks_applied
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.

See this entry in the whole of v2.1.238 →