{"version":"2.1.246","anchor":"hook-state-is-created-and-torn-down-per-session","canonical_anchor":"hook-state-is-created-and-torn-down-per-session","heading":"Hook state is created and torn down per session","tier":"internal","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/hook-state-is-created-and-torn-down-per-session","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Hook state is created and torn down per session\n\nHook state is built per session and cleared on dispose instead of living globally.\n\n**What**\n\nThe hook registry is now built fresh for each session, threaded through tool-use context, the submission-hook pass and assistant post-processing, and cleared on dispose along with read-file and tool state, rather than living as a module-wide global.\n\n**Details**\n\n- A no-op registry ships for contexts where hooks are unavailable; its `addFunctionHook` returns the sentinel id `function-hook-noop`.\n\n**Evidence**\n\n`function-hook-noop`\n\n- Area: Hooks\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}