Claude Platform Docs

Threads

List Session Threads
beta.sessions.threads.list(strsession_id, ThreadListParams**kwargs) -> SyncPageCursor[BetaManagedAgentsSessionThread]
GET/v1/sessions/{session_id}/threads
Get Session Thread
beta.sessions.threads.retrieve(strthread_id, ThreadRetrieveParams**kwargs) -> BetaManagedAgentsSessionThread
GET/v1/sessions/{session_id}/threads/{thread_id}
Archive Session Thread
beta.sessions.threads.archive(strthread_id, ThreadArchiveParams**kwargs) -> BetaManagedAgentsSessionThread
POST/v1/sessions/{session_id}/threads/{thread_id}/archive
Models
class BetaManagedAgentsSessionThread:

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

class BetaManagedAgentsSessionThreadStats:

Timing statistics for a session thread.

active_seconds: Optional[float]

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

formatdouble
duration_seconds: Optional[float]

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

formatdouble
startup_seconds: Optional[float]

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

formatdouble
Literal["running", "idle", "rescheduling", "terminated"]

SessionThreadStatus enum

One of the following:
"running"
"idle"
"rescheduling"
"terminated"
class BetaManagedAgentsSessionThreadUsage:

Cumulative token usage for a session thread across all turns.

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

One of the following:

ThreadsEvents

List Session Thread Events
beta.sessions.threads.events.list(strthread_id, EventListParams**kwargs) -> SyncPageCursor[BetaManagedAgentsSessionEvent]
GET/v1/sessions/{session_id}/threads/{thread_id}/events
Stream Session Thread Events
beta.sessions.threads.events.stream(strthread_id, EventStreamParams**kwargs) -> BetaManagedAgentsStreamSessionThreadEvents
GET/v1/sessions/{session_id}/threads/{thread_id}/stream