{"version":"2.1.337","anchor":"hook-spawn-handles-a-worktree-less-mode","canonical_anchor":"hook-spawn-handles-a-worktree-less-mode","heading":"Hooks get a new start-up check that can cancel them in some modes","tier":"internal","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/hook-spawn-handles-a-worktree-less-mode","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Hooks get a new start-up check that can cancel them in some modes\n\nBefore a hook runs, Claude Code now runs a new check that sets its working folder and may cancel the hook\n\n**Unclear.** It is not clear which modes or folders trigger the new check, so it is unknown whether it affects your hooks.\n\n**What**\n\nA hook is a command Claude Code runs automatically at set points, such as before or after a tool is used. Before a hook starts, Claude Code now runs a new check. The check sets the folder the hook runs in, can rewrite the hook's command when the working folder matches a certain pattern, and can stop the hook and mark it as aborted.\n\n**Why**\n\nHooks may start differently, or not at all, in some modes.\n\n- Area: Hooks\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}