Hooks reference changedhooks
Nearest release: v2.1.285, published 11 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 30 Sep 2026 04:59 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 30 Sep 2026 05:07 UTC.
Upstream edited
Recorded here
Lines+11added
Lines−4removed
From line
855
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits112to this page, all time
#### What a blocked prompt leaves behind
The whole hunk
from line 855, old and new numbered
/
from line 855
855855| :- | :- | :- |
856856| `PreToolUse` | Yes | Blocks the tool call |
857857| `PermissionRequest` | No | Exit code 2 isn't honored for this event and the permission flow proceeds unchanged. Deny through the [`decision` object](#permissionrequest-decision-control) instead |
858| `UserPromptSubmit` | Yes | Blocks prompt processing and erases the prompt |
858| `UserPromptSubmit` | Yes | Blocks the prompt, so it never reaches Claude. See [What a blocked prompt leaves behind](#what-a-blocked-prompt-leaves-behind) |
859859| `UserPromptExpansion` | Yes | Blocks the expansion |
860860| `Stop` | Yes | Prevents Claude from stopping, continues the conversation |
861861| `SubagentStop` | Yes | Prevents the subagent from stopping |
from line 1354
13541354
13551355| Field | Description |
13561356| :- | :- |
1357| `decision` | `"block"` prevents the prompt from being processed and erases it from context. Omit to allow the prompt to proceed |
1357| `decision` | `"block"` stops the prompt before it reaches Claude. Omit to allow the prompt to proceed |
13581358| `reason` | Shown to the user when `decision` is `"block"`. Not added to context |
13591359| `additionalContext` | String added to Claude's context alongside the submitted prompt. See [Add context for Claude](#add-context-for-claude) |
13601360| `sessionTitle` | Sets the session title. Use to name sessions automatically based on the prompt content |
1361| `suppressOriginalPrompt` | If `true` when `decision` is `"block"`, omits the original prompt text from the block message shown to the user |
1361| `suppressOriginalPrompt` | If `true` when the hook blocks the prompt, leaves the prompt text out of the block message. See [What a blocked prompt leaves behind](#what-a-blocked-prompt-leaves-behind) |
13621362
13631363A hook that blocks by exiting 2 routes the same way as `reason`: the block message shows the stderr text to the user, and it isn't added to context.
13641364
from line 1369
13691369 "hookSpecificOutput": {
13701370 "hookEventName": "UserPromptSubmit",
13711371 "additionalContext": "My additional context here",
1372 "sessionTitle": "My session title"
1372 "sessionTitle": "My session title",
1373 "suppressOriginalPrompt": true
13731374 }
13741375}
13751376```
1377
1378#### What a blocked prompt leaves behind
1379
1380A blocked prompt never reaches Claude, but its text isn't removed everywhere. By default the block message shown to the user ends with `Original prompt:` followed by the submitted text, and Claude Code writes that message to the session's transcript file on disk. To leave the text out of the message, print JSON with `"suppressOriginalPrompt": true` inside `hookSpecificOutput`. This works whether the hook blocks with `decision: "block"` or by exiting 2. An exit-2 hook that prints no JSON always gets the prompt text in its block message.
1381
1382`suppressOriginalPrompt` changes only the block message. The submitted text can still appear in local files such as the session transcript and your prompt history, so a blocking hook isn't a way to keep a secret off disk. To limit or remove those files, see [Plaintext storage](/docs/en/claude-directory#plaintext-storage) and [Clear local data](/docs/en/claude-directory#clear-local-data).
13761383
13771384### UserPromptExpansion
13781385
No line in this hunk matches that.