Retrieve a single turn for a specific subagent to inspect status, time boundaries, errors, and token usage.
Endpoint
GET /agents/sessions/{session_id}/subagents/{subagent_id}/turns/{turn_id}
Returns 200 with a single Turn. The query does not start or resume a subagent, and does not create resources.
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
session_id | Yes | string | Session ID, for example sess_xxx |
subagent_id | Yes | string | Stable subagent ID, for example subagent_xxx |
turn_id | Yes | string | Public turn ID, for example turn_xxx |
Request example
Response example
Response fields
usage contains input_tokens, input_tokens_details.cached_tokens, output_tokens, output_tokens_details.reasoning_tokens, and total_tokens. If the related counts are incomplete, the entire usage is null.
| Field | Type | Description |
|---|---|---|
id | string | Public turn ID |
object | string | Turn object type, fixed as agent.session.turn |
session_id | string | Owning session |
agent_id | string | Executing agent |
subagent_id | string / null | The corresponding subagent ID for a subagent turn |
status | string | Turn status: in_progress, waiting, completed, failed, or cancelled |
created_at | integer | Creation time, Unix seconds |
started_at / completed_at | integer / null | Start and completion time, Unix seconds. null before the boundary |
error | object / null | Turn-level error. |
error.code | string | Error code |
error.message | string | Error description |
usage | object / null | Token usage. |
usage.input_tokens | integer | Number of input tokens |
usage.input_tokens_details | object | Input token details. |
usage.input_tokens_details.cached_tokens | integer | Number of input tokens that hit the cache |
usage.output_tokens | integer | Number of output tokens |
usage.output_tokens_details | object | Output token details. |
usage.output_tokens_details.reasoning_tokens | integer | Number of reasoning tokens |
usage.total_tokens | integer | Total number of tokens |
waiting is not a successful terminal state. completed, failed, and cancelled are terminal. The SSE turn.created event can show queued; persisted turns start at in_progress.
Error codes
| HTTP status | Error type / code | Solution |
|---|---|---|
404 | not_found_error / not_found_error | Confirm that the session, subagent, and turn exist in the same workspace, and use matching path levels |
502 | server_error / agents_api_upstream_unavailable | Retry later. If it keeps failing, submit a ticket with the x-request-id from the response headers |