{"version":"2.1.318","anchor":"hook-matcher-metadata-drops-fieldtomatch-project-added-as","canonical_anchor":"hook-matcher-metadata-drops-fieldtomatch-project-added-as","heading":"Hook matcher metadata no longer names the field each matcher checks","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/hook-matcher-metadata-drops-fieldtomatch-project-added-as","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Hook matcher metadata no longer names the field each matcher checks\n\nMany hook events, including SessionStart, PreCompact, PostCompact and StopFailure, drop fieldToMatch from their matcher details and keep only values\n\n**Unclear.** It is not clear whether this only changes descriptions or also how hook matchers are applied.\n\n**What**\n\nA hook is a command you configure to run at set points in Claude Code, such as when a session starts. A matcher narrows which occasions a hook runs for. Each hook event carries descriptive details about its matcher (`matcherMetadata`). Those details no longer include `fieldToMatch`, the name of the field the matcher checks. Only the list of possible `values` remains.\n\n- `SessionStart` and the command-expansion hook event drop `fieldToMatch: \"command_name\"` and `fieldToMatch: \"source\"`.\n\n- Hook events that match on tool names drop `fieldToMatch: \"tool_name\"`.\n\n- The hook event documented with \"Exit code 2 - block the response (action becomes decline)\" drops `fieldToMatch: \"mcp_server_name\"`, and its details are now just `{ values: [] }`.\n\n- The add-dir hook event drops `fieldToMatch: \"source\"` and keeps the values `slash_command` and `register_repo_root`.\n\n- `PreCompact` and `PostCompact` drop `fieldToMatch: \"trigger\"` and keep the values `manual` and `auto`.\n\n- `StopFailure` drops `fieldToMatch: \"error\"`. Its description, \"Fires instead of Stop when an API error (rate limit, auth failure, etc.) ended the turn.\", and its values such as `rate_limit` and `overloaded` remain.\n\n- Separately, a `project` entry is added to a list of commands where the neighbouring entries belong to the \"config\" group.\n\n**Why**\n\nThese details feed hook documentation and setup screens, so those may stop saying which field a matcher checks. The matcher values themselves are unchanged. The findings do not show whether matching or validation behaves differently.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}