---
title: "List agent session turns"
method: GET
path: "/agents/sessions/{session_id}/turns"
tags: ["Agents"]
---

# List agent session turns

`GET /agents/sessions/{session_id}/turns`

Lists turns by creation time and turn ID. The after cursor is exclusive in the selected order. See [session turns](https://developers.openai.com/api/docs/guides/agents-api/sessions/manage#inspect-session-turns).

## Path parameters

- `session_id` string, required

## Query parameters

- `limit` integer
- `order` 'asc' | 'desc' — The order in which paginated resources are returned.
- `after` string

## Response `200`

A page of session turns.

- SessionTurnListResource — A page of Agents API resources, with IDs for retrieving additional pages.
  - `object` 'list', required — The object type, which is always `list`.
  - `data` TurnResource[], required — The resources returned in this page, in the requested sort order.
    - `id` string, required — The ID of the turn.
    - `object` 'agent.session.turn', required — The object type for a turn.
    - `session_id` string, required — The ID of the session that owns the turn.
    - `agent_id` string, required — The ID of the agent that ran the turn.
    - `subagent_id` string, nullable, required — The ID of the subagent that ran the turn, if applicable.
    - `status` 'queued' | 'in_progress' | 'waiting' | 'completed' | 'failed' | 'cancelled', required — The current status of a turn.
    - `created_at` integer, required — 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.
    - `started_at` integer, nullable, required — The Unix timestamp, in seconds, when the turn started.
    - `completed_at` integer, nullable, required — The Unix timestamp, in seconds, when the turn reached a terminal state.
    - `error` SessionTurnErrorResource, required — A customer-safe error describing why a session request failed.
      - `code` 'context_length_exceeded' | 'session_budget_exceeded' | 'usage_limit_exceeded' | 'credit_balance_exhausted' | 'rate_limit_exceeded' | 'server_overloaded' | 'cyber_policy' | 'connection_failed' | 'server_error' | 'authentication_error' | 'invalid_request' | 'resource_not_found' | 'sandbox_error' | 'executor_version_incompatible' | 'active_turn_not_steerable' | 'request_timeout' | 'internal_error', required — Stable public categories for session request failures.
      - `message` string, required — A customer-safe explanation of the failure.
    - `usage` TokenUsageResource, required — Recorded token usage for a session or turn. Usage is best effort and may change.
      - `input_tokens` integer, required — The number of input tokens used by the agent.
      - `input_tokens_details` InputTokensDetailsResource, required — A breakdown of input token usage for a session or turn.
        - `cached_tokens` integer, required — The number of input tokens retrieved from the prompt cache.
      - `output_tokens` integer, required — The number of output tokens generated by the agent.
      - `output_tokens_details` OutputTokensDetailsResource, required — A breakdown of output token usage for a session or turn.
        - `reasoning_tokens` integer, required — The number of output tokens used for reasoning.
      - `total_tokens` integer, required — The total number of input and output tokens used by the agent.
  - `first_id` string, nullable, required — The ID of the first resource in `data`, or `null` if the page is empty.
  - `last_id` string, nullable, required — The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters.
  - `has_more` boolean, required — Whether there are more resources to retrieve after this page.

## Other responses

- `400` — The request was invalid.
- `401` — Authentication or project context was missing.
- `404` — The requested session or event was not found.
- `409` — The request conflicted with the current session state.
- `500` — An internal error occurred.
- `503` — The service is temporarily unavailable.

## Changes

- **2026-09-11** `8c3c08961f62` — 1 warning
  - added the new `credit_balance_exhausted` enum value to the `data/items/error/anyOf[#/components/schemas/SessionTurnErrorResource]/code` response property for the response status `200`
- **2026-09-10** `f2dae1a9aced` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openai/apis/openapi/changes/agents/sessions/:session_id/turns/get.md)

---

[API](https://skmtc.dev/openai/apis/openapi.md) · [All operations](https://skmtc.dev/openai/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/openai/apis/openapi/revisions/c8bd56db4095?raw)
