One read of Claude Code CLIclaude-code-20260930T050701Z
2 pages moved out of 210 read.
Pages moved
2
significant first
Pages read
210
in this capture
Captured
05:07 UTC
Corpus hash
f90fea553b81
corpus-hash
What this read moved
1-2 of 2hooks Changed · +11 / -4 lines
#### What a blocked prompt leaves behind
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
plugin-evals Changed · +2 / -2 lines
from line 472
472472
473473### Trust the plugin directory
474474
475The first time you run `claude plugin eval` against a directory, Claude Code asks `Trust this plugin directory?` before it loads anything from it, unless you already accepted the trust prompt there in an interactive `claude` session. Inside a git repository, answering yes trusts the whole repository, for interactive sessions too. When stdin or stdout isn't a terminal, under `--json`, or when the `CI` environment variable is set to a true value such as `true`, the run can't ask and is refused with exit 1; pass `--trust-plugin` to assert the trust yourself, only for a plugin you'd run on your own machine. A target you name rather than give as a path, meaning an installed plugin or a skills-directory plugin, skips the prompt.
475The first time you run `claude plugin eval` against a directory, Claude Code asks `Trust this plugin directory?` before it loads anything from it, unless you already accepted the trust prompt there in an interactive `claude` session. Inside a git repository, answering yes trusts the whole repository, for interactive sessions too. When stdin or stdout isn't a terminal, or under `--json`, the run can't ask and is refused with exit 1; pass `--trust-plugin` to assert the trust yourself, only for a plugin you'd run on your own machine. A target you name rather than give as a path, meaning an installed plugin or a skills-directory plugin, skips the prompt.
476476
477477Some parts of the plugin and suite run only when you pass their flag for that run:
478478
from line 629
629629
630630### "is not a trusted plugin directory, and this run cannot stop to ask you about it"
631631
632This is the first run against a directory Claude Code doesn't trust yet, and it can't ask you because stdin or stdout isn't a terminal, you passed `--json`, or the `CI` environment variable is set to a true value such as `true`. Run `claude plugin eval <dir>` once in a terminal and answer the prompt, or pass `--trust-plugin` if you trust the plugin's code and suite. See [What a run can access](#security).
632This is the first run against a directory Claude Code doesn't trust yet, and it can't ask you because stdin or stdout isn't a terminal or you passed `--json`. Run `claude plugin eval <dir>` once in a terminal and answer the prompt, or pass `--trust-plugin` if you trust the plugin's code and suite. See [What a run can access](#security).
633633
634634<h3 id="git-is-too-old-for-claude-plugin-eval">
635635 "is too old for claude plugin eval"