{"version":"2.1.337","anchor":"userpromptexpansion-hook-abort-and-stoppedbeforerender-flag","canonical_anchor":"userpromptexpansion-hook-abort-and-stoppedbeforerender-flag","heading":"Stopping a slash command during hooks now halts it before it expands","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/userpromptexpansion-hook-abort-and-stoppedbeforerender-flag","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Stopping a slash command during hooks now halts it before it expands\n\nIf you stop a slash command while its expansion hooks run, Claude Code now halts the expansion and can report it stopped before anything showed\n\n**What**\n\nWhen you type a slash command that expands into a prompt, any `UserPromptExpansion` hooks run first. Hooks are your own scripts that Claude Code runs at set moments. If you stop the command while those hooks are running, Claude Code now checks this once the hooks finish and halts the expansion instead of carrying on. A stopped slash command can also report that it stopped before anything was shown.\n\n**Why**\n\nPressing stop during a slash command's hooks now takes effect more precisely, so the expanded prompt does not go ahead after you cancelled it.\n\n- Area: Hooks\n- Names: `UserPromptExpansion`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}