The session thread object
⚠️
Preview — this feature is being built; the design below is the spec.
The session_thread object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.
Example
{
"id": "thr_01JCC2E4G6J8L0N2Q4S6",
"type": "session_thread",
"session_id": "sesn_01JC7M2K4P6R8T0V2X4Z",
"role": "delegate",
"parent_thread_id": "thr_01JCC1D3F5H7K9M1P3R5",
"agent_id": "agt_01JCC0B2D4F6H8K0M2P4",
"agent_version": 2,
"title": "Check carrier tracking for order 88123",
"status": "interrupted",
"usage": {
"input_tokens": 6120,
"cached_input_tokens": 4096,
"output_tokens": 388,
"cost_usd": "0.0112"
},
"created_at": "2026-11-05T10:02:10Z",
"ended_at": "2026-11-05T10:02:30Z"
}Fields
| Field | Type | Description |
|---|---|---|
id | string | Starts with thr_. |
type | string | The object type, always session_thread. |
session_id | string | The related session. |
role | string | primary for the session’s main conversation, delegate for a sub-agent the primary handed work to. |
parent_thread_id | string or null | The thread that started this one; null for the primary thread. |
agent_id | string | The agent running in this thread. Delegates run the agent named in the parent’s delegates list. |
agent_version | integer | See the endpoint pages below. |
title | string | Display title. |
status | string | running, idle, completed, failed or interrupted. |
usage | object | Tokens and cost for this thread alone. The session’s usage is the sum of all threads. |
created_at | string | When it was created, RFC 3339 UTC (some older objects use Unix seconds). |
ended_at | string | See the endpoint pages below. |
Returned by
POST /v1/sessions/{session_id}/threads/{thread_id}/interruptGET /v1/sessions/{session_id}/threadsGET /v1/sessions/{session_id}/threads/{thread_id}
Was this page helpful?