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

23 pages for sessionend.

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

Events Claude Developer Platform · in the page api/beta/sessions/events …can change, so do not parse it. - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or 2 more` - `BetaMana… List Events Claude Developer Platform · in the page api/beta/sessions/events/list …can change, so do not parse it. - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or 2 more` - `BetaMana… Stream Events Claude Developer Platform · in the page api/beta/sessions/events/stream …can change, so do not parse it. - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or 2 more` - `BetaMana… Threads Claude Developer Platform · in the page api/beta/sessions/threads …can change, so do not parse it. - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or 2 more` - `BetaMana… Events Claude Developer Platform · in the page api/beta/sessions/threads/events …can change, so do not parse it. - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or 2 more` - `BetaMana… List Session Thread Events Claude Developer Platform · in the page api/beta/sessions/threads/events/list …can change, so do not parse it. - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or 2 more` - `BetaMana… Stream Session Thread Events Claude Developer Platform · in the page api/beta/sessions/threads/events/stream …can change, so do not parse it. - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or 2 more` - `BetaMana… events-and-streaming Claude Developer Platform · in the page managed-agents/events-and-streaming …dleEvent idle && idle.StopReason?.Value is BetaManagedAgentsSessionEndTurn) { break; } } ``` ```go Go stream := client.Beta.Sessions.Events.StreamEvents(ctx,… migration Claude Developer Platform · in the page managed-agents/migration …dleEvent idle && idle.StopReason?.Value is BetaManagedAgentsSessionEndTurn) { break; } } ``` ```go Go client := anthropic.NewClient() ctx := context.Backgrou… workflow-runs Claude Developer Platform · in the page managed-agents/workflow-runs …n var finished = idle.StopReason?.Value is BetaManagedAgentsSessionEndTurn; if (openRuns.Count == 0 && finished) { break; } // An idle w… Use Claude Code features in the SDK Claude Code CLI · in the page agent-sdk/claude-code-features …orts additional hook events beyond Python, including `SessionStart`, `SessionEnd`, `TeammateIdle`, and `TaskCompleted`. See the [hooks guide](/docs/en/agent-sdk/hooks.md) for the full event compatibil… Intercept and control agent behavior with hooks Claude Code CLI · in the page agent-sdk/hooks …Yes | Session initialization | Initialize logging and telemetry | | `SessionEnd` | No | Yes | Session termination | Clean up temporary resources | | `Notification` | Yes | Yes | Agent status messages… Agent SDK reference - TypeScript Claude Code CLI · in the page agent-sdk/typescript …nd don't need this option. Some hook events, such as `Notification`, `SessionEnd`, `PreCompact`, and `PostCompact`, never produce an `SDKHookStartedMessage`, even with this option. For those events, C… Claude Code changelog Claude Code CLI · in the page changelog …igh token usage when you choose a smaller auto-compact window * Fixed SessionEnd hooks sometimes not running when you exit while a background command is still running * Fixed `claude --help` naming a… CLI reference Claude Code CLI · in the page cli-reference …and don't need this flag. Some hook events, such as `Notification`, `SessionEnd`, `PreCompact`, and `PostCompact`, never produce a `hook_started` event, even with this flag. For those events, Claude… Debug your configuration Claude Code CLI · in the page debug-your-config …-loads-at-startup). | | Cleanup logic never runs at session end | No `SessionEnd` hook configured | Add a `SessionEnd` hook in `settings.json`. See the [hook events list](/docs/en/hooks.md#hook-events… Run Claude Code programmatically Claude Code CLI · in the page headless …ee of any Bash command that is still running. Claude Code then runs [`SessionEnd` hooks](/docs/en/hooks#sessionend) and exits. While exiting, Claude Code starts no new tool call, sends no new model re… Hooks reference Claude Code CLI · in the page hooks …Events fall into three cadences: * per session: `SessionStart` and `SessionEnd` * per turn: `UserPromptSubmit`, `Stop`, and `StopFailure` * on every tool call inside the agentic loop: `PreToolUse` a… Automate actions with hooks Claude Code CLI · in the page hooks-guide …MCP elicitation, before the response is sent back to the server | | `SessionEnd` | When a session terminates | Each hook has a `type` that determines how it runs. Most hooks use `"type": "command"`,… React to events with a mod Claude Code CLI · in the page plugins/mods/events …settings hook event](/docs/en/hooks.md#hook-events), such as `Stop`, `SessionEnd`, or `PostToolUse`, is also an event named `classic.` followed by the settings hook event's name, such as `classic.Stop… Mods reference Claude Code CLI · in the page plugins/mods/reference …ime | 1 second | | All `session.end` hooks together | As long as the [SessionEnd hook budget](/docs/en/hooks.md#sessionend-input), 1.5 seconds unless you change it, counted from when your settings `Se… Self-hosted environments reference Claude Code CLI · in the page self-hosted-environments-reference …on ends, before force-killing it. Raise the value if the child's own `SessionEnd` hooks need more time. | | `--startup-timeout-min <n>` | `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS` | `15` | Release a ses… Manage sessions Claude Code CLI · in the page sessions …commands](/docs/en/statusline.md#available-data) receive as input. A `SessionEnd` hook can archive the transcript when a session ends. * **Embed Claude in a TypeScript or Python app**: use the [Agent…
Feedback