{"name":"UserPromptSubmit","slug":"userpromptsubmit","family":"hook","title":"Hook events","noun":"hook event","description":"When a prompt is submitted, before Claude processes it. Also fires on [turns Claude Code starts on its own](\/docs\/en\/hooks#userpromptsubmit)","description_source":"docs","described_by":{"doc":"claude-code\/hooks","title":"Hooks reference"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":{"version":"2.1.247","released_at":"2026-08-26 18:02:01","spans":3}},"aliases":[],"entries":[{"version":"2.1.300","anchor":"fork-dispatched-slash-commands-userpromptsubmitexpansion-h","heading":"Blocked slash command prompts are echoed back less often","line":"When a hook blocks a slash command run in a fork, Claude Code shows the original prompt in fewer cases","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text, named in this entry"},{"version":"2.1.300","anchor":"userpromptsubmit-hook-detection-restricted-by-a-new-module-c","heading":"Fewer mods count as prompt hooks when Claude Code checks for them","line":"The check for mods that hook prompt submission now applies an extra test, so some mods that counted before no longer do","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text, named in this entry"},{"version":"2.1.299","anchor":"prompt-submit-outcome-field-on-sdk-system-messages","heading":"SDK messages can say why a prompt hook stopped a prompt","line":"SDK system messages gain a `prompt_submit_outcome` field saying how a prompt submit hook ended a prompt","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text, named in this entry"},{"version":"2.1.299","anchor":"userpromptsubmit-and-promptsubmit-hook-blocks-now-carry-str","heading":"Prompts stopped by hooks now come with a reason","line":"When a `UserPromptSubmit` hook or `prompt.submit` handler stops a prompt, Claude Code now records which kind of stop it was","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text, named in this entry"},{"version":"2.1.299","anchor":"userpromptsubmit-hook-blocked-prompt-reasons-and-commandis","heading":"UserPromptSubmit hooks get more detail about the prompt","line":"Information prepared for `UserPromptSubmit` hooks now includes the command and whether the prompt is an internal one","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text, named in this entry"},{"version":"2.1.299","anchor":"prompt-submit-hook-chain-rewritten-to-handle-slash-commands","heading":"Prompts rewritten by a hook can now be refused with a \"no place to put the change\" message","line":"Prompt hooks now see slash command names and arguments, and some rewrites stop the prompt with a \"Prompt not sent\" message","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text, named in this entry"},{"version":"2.1.296","anchor":"input-hooks-interrupted-by-abort-now-return-interrupted-resu","heading":"Interrupting during prompt-submit hooks keeps what you typed","line":"If you interrupt while UserPromptSubmit hooks are running, the turn is now marked as interrupted and earlier messages are kept","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.296","anchor":"prompt-submit-hook-handling-blocked-prompt-tracking-and-abo","heading":"Prompt-submit hooks that block after an interrupt now end as an interruption","line":"If a prompt-submit hook blocks your prompt after the session was interrupted, Claude Code now treats it as an interruption instead of a normal block","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.296","anchor":"interrupted-while-prompt-checked-handling","heading":"Handling for turns interrupted while prompt hooks are running","line":"Claude Code can now handle a turn that is interrupted while prompt-submit hooks are still checking your prompt","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.296","anchor":"userpromptsubmit-hook-cancellation-distinguishes-interrupts","heading":"Interrupting a UserPromptSubmit hook now counts as cancelling it","line":"Interrupting Claude Code while a UserPromptSubmit hook runs now cancels the hook cleanly, and the debug log says which kind of cancel it was","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"}],"entries_total":23,"docs":[{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":true},{"source":"claude-code","path":"agent-sdk\/hooks","title":"Intercept and control agent behavior with hooks","documented":true},{"source":"claude-code","path":"agent-sdk\/agent-loop","title":"How the agent loop works","documented":false},{"source":"claude-code","path":"agent-sdk\/modifying-system-prompts","title":"Modifying system prompts","documented":false},{"source":"claude-code","path":"agent-sdk\/python","title":"Agent SDK reference - Python","documented":false},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"hooks-guide","title":"Automate actions with hooks","documented":false},{"source":"claude-code","path":"interactive-mode","title":"Interactive mode","documented":false},{"source":"claude-code","path":"security-guidance","title":"Catch security issues as Claude writes code","documented":false}],"docs_total":12,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/hook\/userpromptsubmit","family_url":"https:\/\/changelogs.core-directive.com\/reference\/hook.json"}