{"version":"2.1.271","anchor":"query-loop-now-waits-for-pending-sessionstart-hooks-before-d","canonical_anchor":"query-loop-now-waits-for-pending-sessionstart-hooks-before-d","heading":"SessionStart hook waiting reworked across queued prompts and messages","tier":"notice","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/query-loop-now-waits-for-pending-sessionstart-hooks-before-d","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### SessionStart hook waiting reworked across queued prompts and messages\n\nClaude Code now waits for pending SessionStart hooks before sending queued prompts, but no longer waits before routing host messages\n\n**What**\n\n- The core per-turn input processor now waits for any pending `SessionStart` hooks to finish before a queued prompt (or a non-prompt-type slash command) is sent to the model, handling cancellation and re-queueing if that wait is interrupted.\n\n- When draining the command queue for a resurrected session, if every currently queued exempt command came from that resurrection, execution now waits for `SessionStart` hooks to resolve before running the queue, instead of executing immediately.\n\n- In the host's reply\/message-launch flow, a previous wait for pending hooks before deciding how to send an outgoing queued message (direct insert, enqueue, or immediate run) was removed from that path.\n\n**Why**\n\nThis ensures prompts and resurrected-session commands aren't sent to the model until session-start setup has actually finished, while removing a redundant wait in the separate host message-dispatch path.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5"}