Returns session metadata, the embedded agent snapshot, and resource list. Event history and message content are retrieved through the Event API.
Prerequisites
Endpoint and authentication configuration must be completed. For details, see Overview and authentication.
Endpoint
GET /sessions/{session_id}
Request example
Response fieldsThe response is a Session object with the following fields:idstringSession ID, format sesn_<ULID>type stringFixed as sessionstatus stringSession status: idle / running / terminatedstop_reason object / nullThe reason the session returned to idle. A discriminated union: null (running, or idle and just created with no end reason yet) / {"type": "end_turn"} (model ended on its own) / {"type": "retries_exhausted"} (retries exhausted) / {"type": "requires_action", "pending_batch_id": "...", "pending_call_ids": [...]} (waiting for tool approval). Only meaningful when status is idle; null when running. terminated is a terminal state and the server may retain the previous value — clients should not rely on or interpret it. The requires_action branch carries a non-empty pending_batch_id and pending_call_ids; use them to locate the pending approval calls and fetch the corresponding tool_approval_request events via the Event APIagent objectFull agent configuration snapshot, including id/version/name/model/system/tools, etc.; session-level overrides (if any) are merged into the snapshotenvironment_id stringThe bound environment IDsandbox objectSandbox snapshot persistence configuration and current snapshot state. Omitted when not configured
Properties enable_snapshot booleanWhether snapshot persistence is enabled for the current sessionsnapshot_persistent_seconds integerRetention period of the configured snapshot in seconds; omitted when not configuredis_persisting booleanWhether the current session is retaining an available snapshot; may be omitted before statistics are availablepredict_release_time string / nullExpected release time of the current snapshot in ISO 8601 UTC; null when there is no current snapshotobjectSandbox snapshot duration statistics. May be omitted in the Create response; when persistence is enabled but no snapshot has been created yet, the duration fields are null.
Properties session_total_persisted_hours integer / nullCumulative retained hours of historical snapshots; null when no statistics are availablelatest_snapshot_persisted_hours integer / nullRetained hours of the latest snapshot; null when there is no current snapshotstring / objectSession title and custom business metadataarchived_at string / nullArchive time; null when not archivedcreated_at / updated_at stringCreation/last update time, ISO 8601request_id stringUnique identifier for this requestenvironment_variables objectEnvironment variables injected into the session runtime as string key-value pairs; sandbox code can read them directly by namevault_ids array of stringBound vault ID listmcp_configs array of objectSession-level MCP request headers; each item contains mcp_server_name and headers. Empty array when not configured | Response example |