id: string

The ID of the turn.

minLength0
agent_id: string

The ID of the agent that ran the turn.

minLength0
completed_at: number | null

The Unix timestamp, in seconds, when the turn reached a terminal state.

formatint64
created_at: number

The Unix timestamp, in seconds, used to order the turn by creation time. Subagent turns use their start time, falling back to completion time or the subagent opening time when the preceding timestamps are unavailable.

formatint64
error: SessionTurnError { code, message } | null

A customer-safe error. Non-null only for a failed turn.

object: "agent.session.turn"

The object type. Always agent.session.turn.

session_id: string

The ID of the session that owns the turn.

minLength0
started_at: number | null

The Unix timestamp, in seconds, when the turn started.

formatint64
status: "queued" | "in_progress" | "waiting" | 3 more

The current status of the turn.

One of the following:
"queued"

The turn is waiting to start.

"in_progress"

The turn is in progress.

"waiting"

The turn is waiting for external input.

"completed"

The turn completed successfully.

"failed"

The turn failed.

"cancelled"

The turn was cancelled.

subagent_id: string | null

The ID of the subagent that ran the turn, if applicable.

minLength0
usage: TokenUsage { input_tokens, input_tokens_details, output_tokens, 2 more } | null

Best-effort token usage for the turn, or null if unknown. Recorded usage may change.

prompt_cache_options?: PromptCacheOptions | null

Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

ttl: "30m" | "12h"
One of the following:
"30m"
"12h"