Unclear It is not confirmed that command and isMeta reach the input your hook script receives.
What
A UserPromptSubmit hook is a command you set to run when a prompt is submitted, before Claude works on it. Claude Code has changed how it handles these:
- The information prepared for the hook now includes
commandandisMeta, taken from the submitted prompt. - When a prompt is blocked because the hooks never ran, the block now carries a reason saying so.
- Warnings now say whether the prompt was kept.
Why
Hooks can tell apart prompts that come from a slash command or from Claude Code itself, rather than from what you typed.
Names in the bundleUserPromptSubmit
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up UserPromptSubmit, on Intercept and control agent behavior with hooks.
* `UserPromptSubmit` and [`UserPromptExpansion`](/docs/en/hooks#userpromptexpansion): Claude Code blocks the prompt with a message naming the hook and the timeout, and the session continues. Before v2.1.208, Claude Code ended the query wit…agent-sdk/hooks see the edit
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
It is not confirmed that `command` and `isMeta` reach the input your hook script receives.
Anthropic's documentation agrees
Anthropic's documentation has since written up UserPromptSubmit, on Intercept and control agent behavior with hooks.
Anthropic's release notes agree
Fixed Edit and Retry in Cowork and claude.ai cloud sessions failing on a message stopped while its UserPromptSubmit or mod prompt.submit…