Claude Platform Docs

Threads

List Session Threads
beta.sessions.threads.list(session_id, **kwargs) -> PageCursor<BetaManagedAgentsSessionThread>
GET/v1/sessions/{session_id}/threads
Get Session Thread
beta.sessions.threads.retrieve(thread_id, **kwargs) -> BetaManagedAgentsSessionThread
GET/v1/sessions/{session_id}/threads/{thread_id}
Archive Session Thread
beta.sessions.threads.archive(thread_id, **kwargs) -> BetaManagedAgentsSessionThread
POST/v1/sessions/{session_id}/threads/{thread_id}/archive
Models
class BetaManagedAgentsSessionThread { id, agent, archived_at, 8 more }

An execution thread within a session. Each session has one primary thread plus zero or more child threads spawned by the coordinator.

class BetaManagedAgentsSessionThreadStats { active_seconds, duration_seconds, startup_seconds }

Timing statistics for a session thread.

active_seconds: Float

Cumulative time in seconds the thread spent actively running. Excludes idle time.

formatdouble
duration_seconds: Float

Elapsed time since thread creation in seconds. For archived threads, frozen at the final update.

formatdouble
startup_seconds: Float

Time in seconds for the thread to begin running. Zero for child threads, which start immediately.

formatdouble
BetaManagedAgentsSessionThreadStatus = :running | :idle | :rescheduling | :terminated

SessionThreadStatus enum

One of the following:
:running
:idle
:rescheduling
:terminated
class BetaManagedAgentsSessionThreadUsage { active_seconds, cache_creation, cache_read_input_tokens, 4 more }

Cumulative token usage for a session thread across all turns.

BetaManagedAgentsStreamSessionThreadEvents = BetaManagedAgentsUserMessageEvent { id, content, type, processed_at } | BetaManagedAgentsUserInterruptEvent { id, type, processed_at, session_thread_id } | BetaManagedAgentsUserToolConfirmationEvent { id, result, tool_use_id, 4 more } | 34 more

Server-sent event in a single thread's stream.

One of the following:

ThreadsEvents

List Session Thread Events
beta.sessions.threads.events.list(thread_id, **kwargs) -> PageCursor<BetaManagedAgentsSessionEvent>
GET/v1/sessions/{session_id}/threads/{thread_id}/events
Stream Session Thread Events
beta.sessions.threads.events.stream(thread_id, **kwargs) -> BetaManagedAgentsStreamSessionThreadEvents
GET/v1/sessions/{session_id}/threads/{thread_id}/stream