{"version":"2.1.283","anchor":"hooks-modules-toolcall-pinned-key-matchers-and-runcommands","canonical_anchor":"plugin-runtime-commandrun-hooks-are-now-scoped-to-the-comma","heading":"Hooks modules only receive the commands and tool calls they match","tier":"notice","area":"Mods","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283\/e\/hooks-modules-toolcall-pinned-key-matchers-and-runcommands","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283","markdown":"### Hooks modules only receive the commands and tool calls they match\n\nPlugin hooks modules for command.run now receive only the commands in their runCommands list, and tool.call modules can be skipped on the host\n\n**Unclear.** It is not clear what the new `runCommands` field records.\n\n**What**\n\nPlugins can ship hooks modules: code that runs when certain events happen in Claude Code. `command.run` is the event for running a slash command, and `tool.call` is the event for Claude using a tool. Claude Code now checks before handing an event to a module whether that module wants it.\n\n- `command.run`: a module's registration now records a `runCommands` list. A command goes to the module only if the module has a `command.run` hook and either lists no commands or lists that one. Before, every slash command went to it. `runCommands` also now appears in module analysis output.\n\n- A built-in module, the one that reads `CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING`, now declares `runCommands: [\"clear\", \"diff\", \"resume\"]`. Its hook now fires only for `\/clear`, `\/diff` and `\/resume`.\n\n- `tool.call`: the event now declares `pinnedKeys`. When a module's matcher rejects an event on a pinned key, Claude Code skips that module in the main process instead of sending the event to it. If the matcher fails with an error there, Claude Code logs \"matcher threw on the host ...; the hop decides\" and lets the module decide.\n\n**Why**\n\nModules no longer receive every slash command or every tool call when they only care about some. This avoids an extra round trip to the module for events it would ignore anyway. Plugin authors can rely on a `command.run` hook seeing only the commands it lists.\n\n- Flag `tengu_plugin_hooks_modules`: Not enough to say (read for one account on one subscription tier against v2.1.283; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Mods\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5"}