eventName
UserPromptExpansion (Claude Code)
displayName
UserPromptExpansion (Claude Code)
kind
native
originVendor
Anthropic
direction
pre
blocking
true
family
shell-hook
payloadSchema
type
object
required
- hook_event_name
- expansion_type
- command_name
- command_source
- prompt
properties
hook_event_name
type
string
const
UserPromptExpansion
expansion_type
command_name
command_args
command_source
prompt
description
Fires when a slash command (or MCP prompt) expands into a prompt — before
the expanded prompt enters the model context. Subscribers can inspect the
expansion, mutate it, or block it via decision: "block" / exit 2.
Matchable by command name. Canonicalizes loosely to UserPromptSubmit.