Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

6 pages for stopfailure.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

Intercept and control agent behavior with hooks Claude Code CLI · in the page agent-sdk/hooks …es | Yes | Agent execution stop | Save session state before exit | | `StopFailure` | No | Yes | The turn ends with an API error instead of a normal stop | Log failures or send alerts | | `SubagentStar… Agent SDK reference - TypeScript Claude Code CLI · in the page agent-sdk/typescript …rPromptExpansion" | "SessionStart" | "SessionEnd" | "Stop" | "StopFailure" | "SubagentStart" | "SubagentStop" | "PreCompact" | "PostCompact" | "PreModelSwitch" | "PostModelSwitch"… Desktop application Claude Code CLI · in the page desktop …n't run when an API error ends the turn. For that case, configure a [`StopFailure` hook](/docs/en/hooks#stopfailure). If your organization [runs managed hooks only](/docs/en/settings-reference.md#all… Hooks reference Claude Code CLI · in the page hooks …nStart` and `SessionEnd` * per turn: `UserPromptSubmit`, `Stop`, and `StopFailure` * on every tool call inside the agentic loop: `PreToolUse` and `PostToolUse`, except [`EndConversation`](/docs/en/too… Automate actions with hooks Claude Code CLI · in the page hooks-guide …marked as completed | | `Stop` | When Claude finishes responding | | `StopFailure` | When the turn ends due to an API error | | `TeammateIdle` | When an [agent team](/docs/en/agent-teams.md) teammate… SSH remote sessions in Claude Desktop on 3P Claude Documentation · in the page third-party/claude-desktop/ssh-remote-sessions …ype": "command", "command": "/path/to/alert-user.sh" }] } ], "StopFailure": [ { "hooks": [{ "type": "command", "command": "/path/to/alert-user.sh" }] } ] } } ``` Replace `/path/to…
Feedback