UserPromptExpansion
A Claude Code hook event, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion
Anthropic's own wording. Read off Hooks reference, captured 2026-10-22.
In the changelogs
7Releases whose published page names UserPromptExpansion.
-
v2.1.300
Blocked slash command prompts are echoed back less often
When a hook blocks a slash command run in a fork, Claude Code shows the original prompt in fewer cases
found in this entry's text, named in this entry
-
v2.1.295
A new setting limits what your own skills, agents and hooks can do
Setting CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG stops your own skills, agents and hooks from widening permissions, and makes key hooks required
found in this entry's text
-
v2.1.248
Command and skill names are escaped everywhere they are echoed back
Command and skill names from plugins or MCP servers are escaped everywhere, always on.
found in this entry's text
-
v2.1.248
New hook events and compiled-in plugin admission defaults
Three new hook event names appear, and unverified plugins are still allowed to load.
named in this entry, found in this entry's text
-
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.
named in this entry, found in this entry's text
-
v2.1.236
Some hook events take a separate dispatch path
Six hook events now wait on a readiness step before running; the rest are unchanged.
found in this entry's text
-
v2.1.116
UserPromptExpansion Hook Event
found in this entry's text
First cited
2The earliest release whose published evidence quoted UserPromptExpansion was v2.1.116, 20 Apr 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
0The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the hook event does. All hook events.