108 pages for session_id.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Messages
Claude Developer Platform · in the page
api/compliance/apps/sessions/remote/messages
…messages **GET** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages` Retrieve one remote session's transcript: user prompts, assistant responses, and tool calls and results. Th…
Retrieve remote session messages
Claude Developer Platform · in the page
api/compliance/apps/sessions/remote/messages/list
…messages **GET** `/v1/compliance/apps/sessions/remote/{claude_remote_session_id}/messages` Retrieve one remote session's transcript: user prompts, assistant responses, and tool calls and results. Th…
spans
Claude Developer Platform · in the page
api/opentelemetry/spans
…with placeholders for its path parameters, for example `/v1/sessions/{session_id}`. | | `http.response.status_code` | `int` | Th…
compliance-errors
Claude Developer Platform · in the page
manage-claude/compliance-errors
…ession transcript endpoints (`GET /v1/compliance/apps/sessions/local/{session_id}/messages` and `GET /v1/compliance/apps/sessions/remote/{session_id}/messages`) validate their truncation parameters th…
compliance-sessions
Claude Developer Platform · in the page
manage-claude/compliance-sessions
…cal` lists session metadata, `GET /v1/compliance/apps/sessions/local/{session_id}` retrieves one session's metadata, and `GET /v1/compliance/apps/sessions/local/{session_id}/messages` returns one sess…
inference-hooks-endpoint
Claude Developer Platform · in the page
manage-claude/inference-hooks-endpoint
…| | `session_id` | string or null | Opaque conversation identifier, when one exists. Don't parse it. For Claude Code it is a best-effor…
api
Claude Developer Platform · in the page
manage-claude/opentelemetry/api
…span-id>-01. curl -fsSL "https://api.anthropic.com/v1/sessions/$SESSION_ID/events" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthrop…
budgets
Claude Developer Platform · in the page
managed-agents/budgets
…L curl -sS --fail-with-body "https://api.anthropic.com/v1/sessions/$SESSION_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: managed-ag…
DCF Model Rubric
Claude Developer Platform · in the page
managed-agents/define-outcomes
…itle": "Financial analysis on Costco" }' # Define the outcome: SESSION_ID is the ID from the create response # The agent starts working when it receives the event curl -fsSL "https://api.an…
dreams
Claude Developer Platform · in the page
managed-agents/dreams
…"memory_store_id": "'"$store_id"'" }, { "type": "sessions", "session_ids": ["'"$session_a"'", "'"$session_b"'"] } ], "model": "claude-opus-5-5", "instructions": "Focus on co…
event-deltas
Claude Developer Platform · in the page
managed-agents/event-deltas
…accept the parameter: * **Session-level stream:** `GET /v1/sessions/{session_id}/events/stream` * **Session thread stream:** `GET /v1/sessions/{session_id}/threads/{thread_id}/stream` A subagent's p…
events-and-streaming
Claude Developer Platform · in the page
managed-agents/events-and-streaming
…--fail-with-body -sS -N \ "https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream?beta=true" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "an…
files
Claude Developer Platform · in the page
managed-agents/files
…L curl --fail-with-body -sS "https://api.anthropic.com/v1/sessions/$SESSION_ID/resources" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta:…
github
Claude Developer Platform · in the page
managed-agents/github
…ID`) returned at session creation time (or through `GET /v1/sessions/{session_id}/resources` (python, typescript, ruby: `client.beta.sessions.resources.list()`; go, csharp: `client.Beta.Sessions.Resou…
migration
Claude Developer Platform · in the page
managed-agents/migration
…()`; cli: `ant beta:sessions:events stream`; curl: `GET /v1/sessions/{session_id}/events/stream`). 4. For any local files the agent reads, upload them through the [Files API](https://platform.claude.c…
permission-policies
Claude Developer Platform · in the page
managed-agents/permission-policies
…the tool to run curl -fsSL "https://api.anthropic.com/v1/sessions/$SESSION_ID/events" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: man…
scheduled-deployments
Claude Developer Platform · in the page
managed-agents/scheduled-deployments
…ve sessions, and a successful deployment run contains the associated `session_id` (java: `sessionId`; php: `sessionID`; csharp, go: `SessionID`). To follow a session's lifecycle, track the session eve…
spawn.sh: called once per claimed work item
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes
…s session details into a fresh sandbox. The poller injects `ANTHROPIC_SESSION_ID`, `ANTHROPIC_WORK_ID`, `ANTHROPIC_ENVIRONMENT_ID`, and `ANTHROPIC_ENVIRONMENT_KEY` into the script's environment, and w…
self-hosted-sandboxes-reference
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes-reference
…| | `ANTHROPIC_SESSION_ID` | The session that a claimed work item represents. | The poller, for the `--on-work` script.…
self-hosted-sandboxes-workers
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes-workers
…environment_id=environment_id, session_id=work.data.id, environment_key=environment_key, # The per-session secret is what…
session-operations
Claude Developer Platform · in the page
managed-agents/session-operations
…L curl -sS --fail-with-body "https://api.anthropic.com/v1/sessions/$SESSION_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: managed-ag…
session-threads
Claude Developer Platform · in the page
managed-agents/session-threads
…d session threads The **session-level event stream** (`/v1/sessions/{session_id}/events/stream`) is considered the **primary thread**, containing a condensed view of all activity across all threads.…
sessions
Claude Developer Platform · in the page
managed-agents/sessions
…> ```bash cURL curl -fsSL "https://api.anthropic.com/v1/sessions/$SESSION_ID/events" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: man…
webhooks
Claude Developer Platform · in the page
managed-agents/webhooks
…ocs/en/managed-agents/scheduled-deployments#deployment-runs) for its `session_id` (java: `sessionId`; php: `sessionID`; csharp, go: `SessionID`). | | `deployment_run.failed` | A scheduled run d…
workflow-runs
Claude Developer Platform · in the page
managed-agents/workflow-runs
…then send the user message with client.beta.sessions.events.stream(session_id) as stream: client.beta.sessions.events.send( session_id, events=[ {…
overview
Claude Developer Platform · in the page
release-notes/overview
…ns across your organization, `GET /v1/compliance/apps/sessions/local/{session_id}` retrieves one session's metadata, and `GET /v1/compliance/apps/sessions/local/{session_id}/messages` returns its tran…
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…es or continues a session. Capture the session ID from `ResultMessage.session_id` (available in both SDKs) to resume later. The TypeScript SDK also exposes it as a direct field on the init `SystemMess…
Track cost and usage
Claude Code CLI · in the page
agent-sdk/cost-tracking
…esult**: covers only what has run since the reset, and carries a new `session_id`. * **Every later result**: keeps counting from that reset. * **The last result before each `/clear`**: holds the total…
Rewind file changes with checkpointing
Claude Code CLI · in the page
agent-sdk/file-checkpointing
…oint UUIDs in the response stream ) checkpoint_id = None session_id = None # Run the query and capture checkpoint UUID and session ID async with ClaudeSDKClient(options) as clien…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…t-sdk/python.md#hookinput) SDK references. * All hook inputs share `session_id`, `cwd`, and `hook_event_name`. * `agent_id` and `agent_type` are populated when the hook fires inside a subagent. In…
Hosting the Agent SDK
Claude Code CLI · in the page
agent-sdk/hosting
…laudeAgentOptions, SessionStore import asyncio user_input: str = ... session_id: str = ... # looked up from your database by user session_store: SessionStore = ... # an object store, ke…
Observability with OpenTelemetry
Claude Code CLI · in the page
agent-sdk/observability
…ine. Claude Code omits the attribute if you set `OTEL_METRICS_INCLUDE_SESSION_ID` to a falsy value. > [!NOTE] > > Tracing is in beta. Span names and attributes may change between releases. See > [Tra…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…DKSessionInfo` | Property | Type | Description | | :- | :- | :- | | `session_id` | `str` | Unique session identifier | | `summary` | `str` | Display title: custom title, most recent prompt, auto-gene…
Persist sessions to external storage
Claude Code CLI · in the page
agent-sdk/session-storage
…nSummaryEntry. class SessionKey(TypedDict): project_key: str session_id: str subpath: NotRequired[str] class SessionStore(Protocol): # Required async def append( self, ke…
Work with sessions
Claude Code CLI · in the page
agent-sdk/sessions
…e session ID Resume and fork require a session ID. Read it from the `session_id` field on the result message ([`ResultMessage`](/docs/en/agent-sdk/python#resultmessage) in Python, [`SDKResultMessage`…
Subagents in the SDK
Claude Code CLI · in the page
agent-sdk/subagents
…a subagent programmatically: 1. **Capture the session ID**: extract `session_id` from messages during the first query 2. **Extract the agent ID**: parse `agentId` from the Agent tool result text 3. *…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…| Message role | | `uuid` | `string` | Unique message identifier | | `session_id` | `string` | Session this message belongs to | | `message` | `unknown` | Raw message payload from the transcript | | `…
TypeScript SDK V2 session API (removed)
Claude Code CLI · in the page
agent-sdk/typescript-v2-preview
…function* createInputStream() { yield { type: "user", session_id: "", message: { role: "user", content: [{ type: "text", text: "What is 5 + 3?" }] }, parent_tool_use_id: nu…
Use Claude Code in the cloud
Claude Code CLI · in the page
claude-code-on-the-web
…``` Pass `--output-format json` for a machine-readable result: `{ok, session_id, url}` on success, or `{ok: false, session_id, error}` when the send fails, for example when the session is missing or…
Configure cloud environments
Claude Code CLI · in the page
cloud-environments
….ai, and the session can read its own ID from the `CLAUDE_CODE_REMOTE_SESSION_ID` environment variable. Use this to put a traceable link in PR bodies, commit messages, Slack posts, or generated report…
Environment variables
Claude Code CLI · in the page
env-vars
…| | `CLAUDE_CODE_BRIDGE_SESSION_ID` | Set automatically in Bash tool and [hook command](/docs/en/hooks) subprocesses while the ses…
Run Claude Code programmatically
Claude Code CLI · in the page
headless
…ror`, or `unknown` | | `uuid` | string | unique event identifier | | `session_id` | string | session the event belongs to | #### Read session metadata The `system/init` event reports session metadat…
Hooks reference
Claude Code CLI · in the page
hooks
…local CLI. Claude Code v2.1.199 and later sets [`$CLAUDE_CODE_BRIDGE_SESSION_ID`](/docs/en/env-vars) to the [Remote Control](/docs/en/remote-control.md) session ID while the local session has an acti…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…exit code. #### Hook input Every event includes common fields like `session_id`, a unique ID for the session, and `cwd`, the working directory when the event fired, but each event type adds differen…
Monitoring
Claude Code CLI · in the page
monitoring-usage
…alue | Example to Disable | | - | - | - | - | | `OTEL_METRICS_INCLUDE_SESSION_ID` | Include session.id and, on cloud sessions, ccr.session.id attributes in metrics | `true` | `false` | | `OTEL_METRICS…
Automate work with scheduled tasks
Claude Code CLI · in the page
routines
…URL: ```json theme={null} { "type": "routine_fire", "claude_code_session_id": "session_01HJKLMNOPQRSTUVWXYZ", "claude_code_session_url": "https://claude.ai/code/session_01HJKLMNOPQRSTUVWXYZ" }…
Customize sessions in self-hosted environments
Claude Code CLI · in the page
self-hosted-environments-configuration
…ed binary without hardcoding an install path. | | `CLAUDE_CODE_REMOTE_SESSION_ID` | Session ID in the tagged `cse_...` form. This is the same session the [lifecycle hooks](#lifecycle-hooks) see as `CL…
Verify session identity in self-hosted environments
Claude Code CLI · in the page
self-hosted-environments-identity
…mail?: string; sub?: string }; return { sessionId: payload["ccr:session_id"] as string, poolId: payload["ccr:pool_id"] as string, orgId: payload["ccr:org_id"] as string, creatorEmail…
Self-hosted environments reference
Claude Code CLI · in the page
self-hosted-environments-reference
…) instead. | | `--release-idle-session-min <n>` | `SELF_HOSTED_RUNNER_SESSION_IDLE_MS` | `0` | Release a session slot after N minutes of inactivity once a turn finishes or the session waits for the us…
Test self-hosted environments end to end
Claude Code CLI · in the page
self-hosted-environments-testing
…sistant_message` in its stdin JSON and appends it to `$E2E_REPLY_DIR/<session_id>.txt`. Install it the same way as the [commit-nudge Stop hook](/docs/en/self-hosted-environments-configuration.md#promp…