Claude Platform Docs

Threads

List Session Threads
beta.sessions.threads.list(session_id, **kwargs) -> SyncPageCursor[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 BetaManagedAgentsInlineAgent: type: "inline"; description; mcp_servers; ... # 5 more

An agent that has no Agent resource, and so no id or version. It is defined inline, in a workflow run's plan or when a session thread is spawned, and is not saved.

class BetaManagedAgentsSessionThread: type: "session_thread"; id; agent; ... # 9 more

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

class BetaManagedAgentsSessionThreadStats: active_seconds; duration_seconds; startup_seconds

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
type BetaManagedAgentsSessionThreadStatus = Literal["running", "idle", "rescheduling", "terminated"]
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.

type BetaManagedAgentsStreamSessionThreadEvents = ...

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) -> SyncPageCursor[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