Skip to main content
GET
Returns the current state of a session along with last_prompt (the polling status of the most recent prompt), prompt_history, and lifecycle policy. This is the endpoint to poll after POST /api/v0/sessions/launch or after sending a prompt via POST /api/v0/sessions/{id}/prompt. The response shape is intentionally different from GET /api/sessions/{id} - v0 includes the polling fields needed for fire-and-forget agent workflows. Required scope: sessions:read

Path Parameters

string
required
The session ID returned by launch or create.

Headers

string
required
Bearer token. Example: Bearer runtm_xxx

Response

string
Session ID.
string
Sandbox state: creating, running, paused, error.
string
Coding agent (e.g. claude-code).
string | null
Template the session was scaffolded from.
string
ISO 8601 creation timestamp.
string | null
TTL expiry. null for keep_alive sessions.
number
Aggregate cost across all prompts.
integer
Number of prompts run in this session.
string | null
Display name.
string | null
GitHub owner/repo link.
object | null
Status of the most recent prompt - the primary polling field.
  • status - idle, running, completed, error, timed_out
  • prompt_preview - first 200 chars of the prompt
  • model - model used (e.g. sonnet)
  • started_at / completed_at - ISO 8601 timestamps
  • cost_usd - cost in USD for this prompt
  • summary - first 500 chars of the agent’s final response
  • error - error string if status is error or timed_out
  • plan_mode - whether plan mode was enabled
array
Ordered list of all prompts run in this session, each with the same shape as last_prompt.
object | null
Lifecycle policy applied at launch:
  • on_complete - pause, destroy, or keep_alive
  • ttl_minutes - TTL in minutes
  • ttl_expires_at - ISO 8601 expiry timestamp

Polling pattern

For high-volume agents, use webhooks instead of polling.