Search the documentation
20 pages for sessionstart.
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
…tinguishes them: * `"init"`: session metadata for the run. When a `SessionStart` or `Setup` hook runs during session startup, its [hook lifecycle messages](/docs/en/agent-sdk/typescript#sdkhookstar…
Use Claude Code features in the SDK
Claude Code CLI · in the page
agent-sdk/claude-code-features
…eScript SDK supports additional hook events beyond Python, including `SessionStart`, `SessionEnd`, `TeammateIdle`, and `TaskCompleted`. See the [hooks guide](/docs/en/agent-sdk/hooks) for the full eve…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…denials. See [PermissionDenied](/docs/en/hooks#permissiondenied) | | `SessionStart` | No | Yes | Session initialization…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…HookResponseMessage`](#sdkhookresponsemessage). Lifecycle events for `SessionStart` and `Setup` hooks are always included and don't need this option. Some hook events, such as `Notification`, `Session…
Claude Code changelog
Claude Code CLI · in the page
changelog
…n one line * Remote sessions keep sending keep-alives while a long `SessionStart` or `Setup` hook runs, so the container is not idle-reaped mid-hook * `/goal`: repeat check-ins on long-running bac…
CLI reference
Claude Code CLI · in the page
cli-reference
…| Run [Setup](/docs/en/hooks#setup) and `SessionStart` hooks, then exit without starting a conversation…
Configure cloud environments
Claude Code CLI · in the page
cloud-environments
…t has known [proxy compatibility issues](#install-dependencies-with-a-sessionstart-hook) for package fetching. To get the versions of most of the tools in this table, ask Claude to run `check-tools`…
Explore the context window
Claude Code CLI · in the page
context-window
…the conversation | | [SessionStart hooks](/docs/en/hooks-guide#re-inject-context-after-compaction) that match the `compact` source | Claude Code runs th…
Message your other Claude Code sessions
Claude Code CLI · in the page
cross-session-messaging
…on, Claude Code exports the variable before any hook runs, including `SessionStart`. * Each session exports its own socket, never one inherited from a parent session. On macOS and Linux, Claude Cod…
Extend Claude Code
Claude Code CLI · in the page
features-overview
…fecycle events](/docs/en/hooks#hook-events) such as `PostToolUse` or `SessionStart` | You typing `/<name>`, or Claude matching the description to your task | | **Determinism** | Always fires on i…
Run Claude Code programmatically
Claude Code CLI · in the page
headless
…/en/agent-sdk/typescript#sdkhookstartedmessage), while a configured [`SessionStart`](/docs/en/hooks#sessionstart) or [`Setup`](/docs/en/hooks#setup) hook runs. These stream as the hook produces them.…
Hooks reference
Claude Code CLI · in the page
hooks
…n a decision. Events fall into three cadences: * once per session: `SessionStart` and `SessionEnd` * once per turn: `UserPromptSubmit`, `Stop`, and `StopFailure` * on every tool call inside the agen…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…e conversation to free space. This can lose important details. Use a `SessionStart` hook with a `compact` matcher to re-inject critical context after every compaction. Claude Code adds plain text you…
Set up Claude Code in a monorepo or large codebase
Claude Code CLI · in the page
large-codebases
…ree has no signal about which plugin that area's owners maintain. A [`SessionStart` hook](/docs/en/hooks#sessionstart) can close that gap, since Claude Code adds plain text the hook prints to stdout t…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…---------------------------------------------------------------- | | `SessionStart` | When a session begins or resumes…
Catch security issues as Claude writes code
Claude Code CLI · in the page
security-guidance
…---------------------------------------------------------------- | | `SessionStart` | Bootstrap the plugin's Python environment…
Self-hosted environments reference
Claude Code CLI · in the page
self-hosted-environments-reference
…lf_hosted_runner_session_start_hook_errors_total` | `SessionStart` hooks that reported an error outcome, one per failing hook execution…
Tools reference
Claude Code CLI · in the page
tools-reference
…n/env-vars) to a shell script before launching Claude Code, or use a [SessionStart hook](/docs/en/hooks#persist-environment-variables) to populate it dynamically. ### Timeout and output limits Each…
Get started with Claude Code on the web
Claude Code CLI · in the page
web-quickstart
…lly. * Move the largest downloads out of the setup script and into a [SessionStart hook](/docs/en/cloud-environments#setup-scripts-vs-sessionstart-hooks) that launches them in the background, so the s…
Week 22 · May 25–29, 2026
Claude Code CLI · in the page
whats-new/2026-w22
…ode> command re-scans skill directories without restarting, and <code>SessionStart</code> hooks can return <code>reloadSkills: true</code> to make skills they install available in the same session</di…