12 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
…se` | After a tool returns | Audit outputs, trigger side effects | | `UserPromptSubmit` | When a prompt is sent | Inject additional context into prompts | | `Stop` | When the agent finishes | Validate…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…e next model call | Inject conventions once for the whole batch | | [`UserPromptSubmit`](/docs/en/hooks#userpromptsubmit) | Yes | Yes | A prompt is submitted, including a turn Claude Code starts on it…
Modifying system prompts
Claude Code CLI · in the page
agent-sdk/modifying-system-prompts
…[`additionalContext`](/docs/en/hooks#add-context-for-claude) from a `UserPromptSubmit` or `PostToolUse` [hook callback](/docs/en/agent-sdk/hooks#outputs), written as a factual statement such as "The…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…"PostToolUseFailure", # Called when a tool execution fails "UserPromptSubmit", # Called when a prompt is submitted "Stop", # Called when stopping execution "SubagentStop", # Calle…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…n-error status lines Claude Code raises, and hook feedback such as a `UserPromptSubmit` hook's block reason. On Claude Code v2.1.227 or later, a hook's [`systemMessage`](/docs/en/hooks#json-output) c…
Claude Code changelog
Claude Code CLI · in the page
changelog
…urn a timeout error when still unanswered after 11 minutes * Changed `UserPromptSubmit` hooks to run before a skill or custom slash command expands, so a hook that blocks the prompt now also stops its…
Hooks reference
Claude Code CLI · in the page
hooks
…adences: * per session: `SessionStart` and `SessionEnd` * 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
…tenance` in `-p` mode. For one-time preparation in CI or scripts | | `UserPromptSubmit` | When a prompt is submitted, before Claude processes it. Also fires on [turns Claude Code starts on its own](/d…
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…
Catch security issues as Claude writes code
Claude Code CLI · in the page
security-guidance
…- | | `SessionStart` | Bootstrap the plugin's Python environment | | `UserPromptSubmit` | Capture the working-tree baseline that the end-of-turn review diffs against | | `PostToolUse` on `Edit`, `Writ…
Week 15 · April 6–10, 2026
Claude Code CLI · in the page
whats-new/2026-w15
…xes, `/dev/tcp` redirects, and compound commands now prompt correctly`UserPromptSubmit` hooks can set the session title via `hookSpecificOutput.sessionTitle` [Full changelog for v2.1.92–v2.1.101 →](/…
MCP, plugins, skills, and hooks
Claude Documentation · in the page
third-party/claude-desktop/extensions
…the home screen runs the same hooks as any other Cowork session. A `UserPromptSubmit` hook that blocks a prompt stops that turn and shows the hook's reason to the user. When a conversation or sessio…