{"version":"2.1.267","anchor":"new-diagnostics-for-malformed-plugin-hook-matchers-and-hook","canonical_anchor":"new-diagnostics-for-malformed-plugin-hook-matchers-and-hook","heading":"New diagnostics for malformed plugin hook matchers and hook re-entry","tier":"notice","area":"Plugins","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267\/e\/new-diagnostics-for-malformed-plugin-hook-matchers-and-hook","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267","markdown":"### New diagnostics for malformed plugin hook matchers and hook re-entry\n\nNew warnings catch malformed plugin hook matchers and hook re-entry\n\n**What**\n\nClaude Code now detects when a plugin's hook matcher (the `on()` condition that decides when a hook runs) is structurally wrong, such as using an object matcher against a value that can only be a scalar, and logs a one-time warning per file path explaining the mismatch, capped at 32 warnings per module and event to avoid log spam.\n\nIt also now logs when a hooks module's own hook is skipped, or has some of its registrations left out, because that module is already being dispatched (re-entry protection), naming the chain of nested hook calls that led there.\n\n**Why**\n\nThese diagnostics help plugin authors notice when a hook matcher is written incorrectly and will never fire, and understand why a hook was skipped due to re-entry, instead of the failure passing silently.\n\n- Area: Plugins\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}