{"version":"2.1.296","anchor":"hook-matcher-regex-errors-can-now-propagate-instead-of-being","canonical_anchor":"hook-matcher-regex-errors-can-now-propagate-instead-of-being","heading":"Some broken hook matcher patterns may now raise an error instead of failing silently","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296\/e\/hook-matcher-regex-errors-can-now-propagate-instead-of-being","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296","markdown":"### Some broken hook matcher patterns may now raise an error instead of failing silently\n\nHook matcher patterns are now checked before use, and one kind of failure is raised as an error instead of only being logged\n\n**Unclear.** It is not known which matcher patterns the new check rejects with an error.\n\n**What**\n\nA hook is a command Claude Code runs automatically at certain moments. Its matcher is a pattern (a regular expression) that decides which tools it applies to. Claude Code now builds these patterns through a separate checking step. One particular kind of error from that step is now passed on as an error. Other errors are still only logged as \"Invalid regex pattern in hook matcher\", and the hook simply does not match.\n\n**Why**\n\nSome unsafe or very large matcher patterns might now be rejected openly, where before the hook would just quietly never run.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}