{"version":"2.1.326","anchor":"session-end-hooks-map-to-sessionstop","canonical_anchor":"session-end-hooks-map-to-sessionstop","heading":"New session.stop event for hooks","tier":"internal","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/session-end-hooks-map-to-sessionstop","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### New session.stop event for hooks\n\nA session.stop event was added, and hooks tied to session end are now attributed to it, along with some smaller internal limits\n\n**What**\n\nA hook is code that runs when something happens in a session, a session being one run of Claude Code. A new `session.stop` event was added.\n\n- When the events a hook came from include `session.stop` but not `session.start`, the hook is now attributed to `session.stop`. Before, it was attributed to the first event in its list.\n\nOther changes shipped alongside it:\n\n- New limits: `unprovenCallerMs` of 10,000 (10 seconds) and `unprovenCallersMax` of 256.\n\n- A `hasEnded` value is now passed to the display that shows a tool's progress.\n\n- Adding directories now calls a new sync function, `$wn`.\n\n**Why**\n\nHooks that run when a session ends are now reported under the event they actually belong to, instead of being labelled with an unrelated earlier event. The other pieces are internal and do not need anything from you.\n\n- Area: Hooks\n- Names: `session.stop`, `session.start`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}