Skip to main content
GET
Get session thread

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Path Parameters

session_id
string<uuid>
required

Any session id (UUID) in the tree; the read resolves to its root session.

thread_id
string
required

Thread id as returned by managedAgentsListSessionThreads. Threads the runtime creates carry the sub-session's UUID; an imported transcript may carry the source system's own thread id.

Minimum string length: 1

Response

One context-isolated execution stream inside a multi-agent session tree, as registered in the thread registry. Returned when listing a session's threads or reading a whole session tree.

One context-isolated execution stream inside a multi-agent session tree, as registered in the thread registry. Returned when listing a session's threads or reading a whole session tree.

agent_id
string
required

Agent this thread runs (UUID).

created_at
string<date-time>
required

RFC 3339 timestamp of when this record was created. Server-assigned.

role
string
required

What the thread exists to do within the tree, for example subagent, grader, or advisor. Not a chat message role.

root_session_id
string
required

Root session of the multi-agent tree this thread belongs to (UUID). Equal to session_id for a root session.

session_id
string
required

Session this thread belongs to (UUID).

session_path
string
required

Slash-joined ancestry of session ids from the tree root down to the session whose events this thread's events are stored under, for example "/root-id/child-id".

status
string
required

Thread lifecycle: running (executing now), idle (awaiting more input), or terminated (finished; see stop_reason).

thread_id
string
required

Identifier for this thread within its session tree (UUID). Server-assigned. For a subagent thread it is the child session id, so the thread and the session carrying its events resolve each other directly.

thread_path
string
required

Slash-joined ancestry of this thread within the tree, used to order threads for display. Defaults to session_path when the thread has no deeper nesting of its own.

updated_at
string<date-time>
required

RFC 3339 timestamp of the last change to this record. Server-assigned.

agent_version_id
string

Agent version this thread runs (UUID). Absent when the thread was not pinned to a specific version.

archived_at
string<date-time>

RFC 3339 timestamp of when this thread was archived and stopped appearing as an active stream. Absent while the thread is not archived.

name
string

Human-readable label for this thread, supplied when it was spawned. Optional and never interpreted by the service.

parent_session_id
string

Session the spawning thread belongs to (UUID). Absent on the tree's top-level thread.

parent_thread_id
string

Thread that spawned this one (UUID). Absent on the tree's top-level thread.

stop_reason
object

Structured reason the thread last stopped, forwarded from the agent loop, for example {"type": "end_turn"} or {"type": "error", "message": ...}. Absent while the thread has not stopped.