Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.265 ·

Hook messages during session start/resume can now be deferred and released later

SessionStart hook transcript messages can now be held back and inserted into the transcript only when explicitly released

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaHookswhat it touches
KindImprovementsin v2.1.265,
Group of 3 You'll notice

SessionStart hook transcript messages can now be held back and inserted into the transcript only when explicitly released

What

  • The main session controller gained deferHookMessages/releasePendingHookMessages methods, wired into the REPL as deferHookMessages/releaseDeferredHookMessages props, letting a pending hook set's transcript messages be held back instead of inserted immediately, until explicitly released.
  • Before running a new turn (when starting fresh rather than resuming a concurrent query), the agent now awaits any pending/deferred hook set via awaitPendingHooks(), so the turn doesn't start until hooks have resolved (the wait is skipped only if the abort signal actually fires).
  • On session resume, the mechanism for landing SessionStart-type hook messages into the transcript was reworked: instead of a single pending-promise plus a "landed" flag, there is now a _pendingHookSet object with deferHookMessages, awaitStartupHooks, releasePendingHookMessages, and abort support, tied to session id checks so stale hook results for a since-replaced session get discarded.

Why This makes hook-driven transcript messages around session start and resume more reliable: turns wait for pending hooks instead of racing them, hook messages can be staged and released at the right moment, and results from a stale, already-replaced session no longer leak into the current one.

See this entry in the whole of v2.1.265 →