{"version":"2.1.265","anchor":"command-execution-can-now-be-intercepted-by-commandruncomm","canonical_anchor":"command-execution-can-now-be-intercepted-by-commandruncomm","heading":"Command execution can now be intercepted by command.run\/command.describe hooks","tier":"use","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.265\/e\/command-execution-can-now-be-intercepted-by-commandruncomm","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.265","markdown":"### Command execution can now be intercepted by command.run\/command.describe hooks\n\nSlash-command execution can now be intercepted and rewritten by command.run\/command.describe hooks\n\n**What**\n\nSlash commands now pass through a new hook chain when they run, keyed on two hook events named `command.run` and `command.describe`. A hook (a custom script that reacts to Claude Code's behavior) can observe or rewrite the text a command prints before it's shown, using a `next()` pattern to pass control along the chain. Claude Code also now shows a clearer error message when a queued command never actually ran, explaining that it did not go through `command.run`.\n\n**Why**\n\nThis gives hooks a formal way to intercept and modify slash-command output, and gives users a clearer explanation when a command was queued but never executed.\n\n- Area: Hooks\n- Names: `command.run`, `command.describe`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}