Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.238 ·

Prompt-expansion hooks can hide the original prompt from a block message

Prompt-expansion hooks can keep your original prompt text out of the block message.

Use it now No documentation found New Features
JSON All of v2.1.238
Use it nowTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
HooksArea: what it touches
New FeaturesKind: in v2.1.238,
What probably matters to youSection of the release
What

Hooks on the UserPromptExpansion event can now return a flag that keeps the user's original prompt text out of the message shown when the hook blocks the prompt. This matches what the prompt-submit hook could already do, and works on this build with no flag to enable.

Details
  • The hook output schema gained the optional boolean alongside additionalContext.
  • The consumer copies it onto the hook result along the same path the prompt-submit hook uses.
  • Only takes effect when the hook's decision is block.
Evidence

When decision is "block", omit the original prompt from the block message

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Read from
Names in the bundleUserPromptExpansion
Since it was published

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 UserPromptExpansion, on Hooks reference. | UserPromptSubmit, UserPromptExpansion, PostToolUse, PostToolUseFailure, PostToolBatch, Stop, SubagentStop, ConfigChange, PreCompact | Top-level `decision` | `decision: "block"`, `reason`. Stop and SubagentStop also accept `hookSpecificOu… hooks see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up UserPromptExpansion, on Hooks reference.

See this entry in the whole of v2.1.238 →

Feedback