{"version":"2.1.271","anchor":"hook-addreplace-operations-now-validate-before-applying","canonical_anchor":"hook-addreplace-operations-now-validate-before-applying","heading":"Hook add\/replace operations now validate before applying","tier":"notice","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/hook-addreplace-operations-now-validate-before-applying","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### Hook add\/replace operations now validate before applying\n\nAdding or replacing a hook now runs a validation check before applying the change\n\n**What**\n\nHooks are scripts that run automatically at certain points, such as before or after a tool call. When you add or replace a hook matcher (the rule that decides when a hook fires), Claude Code now runs a validation pass first. If that validation fails, the operation is rejected with a specific outcome instead of always being applied.\n\n**Why**\n\nThis stops invalid hook configurations from being silently saved, catching problems at the point of change rather than later when the hook fails to work as expected.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}