{"version":"2.1.334","anchor":"hook-approval-only-counts-for-entering-a-worktree-if-it-was","canonical_anchor":"hook-approval-only-counts-for-entering-a-worktree-if-it-was","heading":"A hook's approval only counts for the exact call that enters a worktree","tier":"notice","area":"Hooks","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/hook-approval-only-counts-for-entering-a-worktree-if-it-was","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### A hook's approval only counts for the exact call that enters a worktree\n\nWhen an agent enters a worktree, a hook's approval now counts only if it was given for that same tool call, not for a different one\n\n**What**\n\nA worktree is a separate working copy of a git repository. A hook is a command you configure that runs at set points and can approve requests. A tool call is one action Claude takes, such as running a command.\n\nWhen an agent enters a worktree, a permission prompt approved by a hook now counts only if that approval was given for the same tool call. Before, any hook approval counted. If the approval came from a different call, Claude Code now moves write access to the worktree. It no longer reports that it added no sandbox write permission. A sandbox is a restricted area that limits where Claude can write.\n\n**Why**\n\nPermissions are tighter: a hook's approval of one action no longer carries over to another.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: yes"}