{"version":"2.1.265","anchor":"hook-engine-reworked-into-explicit-coremanaged-layering-wit","canonical_anchor":"hook-engine-reworked-into-explicit-coremanaged-layering-wit","heading":"Hook engine reworked into explicit core\/managed layering with unified result merging","tier":"internal","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.265\/e\/hook-engine-reworked-into-explicit-coremanaged-layering-wit","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.265","markdown":"### Hook engine reworked into explicit core\/managed layering with unified result merging\n\nHook execution engine rebuilt with a clearer core\/managed split and unified result merging\n\n**What**\n\nThe internal system that runs hooks has been reorganized. It now clearly separates \"core\" hook handling from \"managed\" hook handling, and adds a merge step that combines results from multiple hooks - things like permission decisions, extra context to inject, and file paths to watch - using a priority order where a deny always beats an ask, and an ask always beats an allow. Classic shell-based hooks and newer function-based hooks are now handled through the same unified path, including tracking blocked commands and results tied to `WorktreeCreate` events (which fire when a worktree, an isolated copy of a repository, is being created).\n\n**Why**\n\nThis is an internal restructuring that makes hook behavior more consistent regardless of whether a hook is a shell script or a function, and ensures that when multiple hooks weigh in on the same action, the strictest decision wins.\n\n- Area: Hooks\n- Names: `WorktreeCreate`\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 3\/5"}