Skip to main content
GET

Behavior

The status never carries the answer. To get it, follow the polling rules. Works without a key on shared sessions.

Path parameters

string
required
The session ID.

Response

200 with the status object.
string
required
Current state: queued, pending, running, paused, idle, awaiting_tool_results, completed, failed, timed_out, or interrupted, as in the lifecycle.
string | null
Short, stable error message if the session failed or timed out. Branch on error_code, not on this text.
string | null
Machine-readable failure category if the session failed or timed out: environment_error, no_answer, answer_validation, timeout, insufficient_credit, or internal.
string | null
The agent’s self-assessed outcome, reported with its final answer: success, partial, infeasible, or blocked. null until reported.
integer
Steps taken so far, where each step is one decide-and-act cycle.
object[]
Per-model token usage. Empty until the agent calls a model.
string
integer
integer
Input served from the prompt cache, billed at a discount.
integer
integer
string[]
IDs of the child sessions this session spawned. List them with their agent labels via GET /sessions?parent_session_id={id}.
object[]
The custom tool calls the agent is waiting on. Echo each one back as tool_req when you post its result. Empty unless the status is awaiting_tool_results, or paused while calls are pending.
string
object
string | null

Errors