Search the documentation
10 pages for userpromptsubmit.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…urns | Audit outputs, trigger side effects | | `UserPromptSubmit` | When a prompt is sent | Inject additional context into prompts | | `Stop`…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…| | `UserPromptSubmit` | Yes | Yes | User prompt submission…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…"PostToolUseFailure", # Called when a tool execution fails "UserPromptSubmit", # Called when user submits a prompt "Stop", # Called when stopping execution "SubagentStop", # Calle…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…by the loop. Carries non-error status lines, hook feedback such as a `UserPromptSubmit` hook's block reason, and command output. On Claude Code v2.1.227 or later, a hook's [`systemMessage`](/docs/en/h…
Hooks reference
Claude Code CLI · in the page
hooks
…* once per session: `SessionStart` and `SessionEnd` * once per turn: `UserPromptSubmit`, `Stop`, and `StopFailure` * on every tool call inside the agentic loop: `PreToolUse` and `PostToolUse`, except…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…| | `UserPromptSubmit` | When you submit a prompt, before Claude processes it…
Interactive mode
Claude Code CLI · in the page
interactive-mode
…-options` keeps counting down. * **The continuation is blocked**: a [`UserPromptSubmit` hook](/docs/en/hooks#userpromptsubmit) that blocks the continuation prompt, or a failure before it reaches the m…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…| | `UserPromptSubmit` | When you submit a prompt, before Claude processes it…
Catch security issues as Claude writes code
Claude Code CLI · in the page
security-guidance
…he plugin's Python environment | | `UserPromptSubmit` | Capture the working-tree baseline that the end-of-turn review di…
Week 15 · April 6–10, 2026
Claude Code CLI · in the page
whats-new/2026-w15
…ects, and compound commands now prompt correctly</div> <div><code>UserPromptSubmit</code> hooks can set the session title via <code>hookSpecificOutput.sessionTitle</code></div> </div> </div> [F…