---
title: "List sessions"
method: GET
path: "/o/{org}/sessions"
tags: ["Sessions"]
---

# List sessions

`GET /o/{org}/sessions`

## Request

- Base URL: `https://api.prix.dev`
- URL: `https://api.prix.dev/o/{org}/sessions`
- Auth: HTTP bearer

With an API key: the org's sessions the key can read, newest first, at most
100 (`limit`, default 50), optionally only one `status`, each in the shape
`GET /o/{org}/sessions/{session}` returns (`CloudRunSessionList`). A key
takes only `status` and `limit`.

With a signed-in session (the console): a search across every Project in
the org, filtered by the other query parameters, in the console's browsing
shape. With `selector`, it resolves exactly one session by full id, unique
id prefix, or title; when it matches more than one, the answer is `409`
with the `candidates`. These errors use `{code, message}`.

## Query parameters

- `selector` string
- `q` string[]
- `project` string
- `source` 'console' | 'api' | 'mcp' | 'automation' | 'slack' | 'github' | 'linear'
- `api_key` string
- `agent` string
- `kind` 'cloud' | 'local'
- `harness` 'claude' | 'codex' | 'opencode': Launch-boundary managed harnesses.
- `mode` 'headless' | 'interactive'
- `model` string
- `repo` string
- `status` string
- `since` string
- `until` string
- `sort` 'recent' | 'cost' | 'duration'
- `count` boolean
- `limit` integer
- `cursor` string

## Response `200`

The sessions; for a signed-in session, the matching sessions or the one a selector resolved to.

- union
  - CloudRunSessionList
    - `sessions` CloudRunSession[], required
      - `execution_id` string, required: The session id.
      - `org_id` string, required: The org as the request's path named it.
      - `project_id` string, uuid: The Project the console ran the session in.
      - `status` 'queued' | 'allocating' | 'running' | 'paused' | 'input_required' | 'needs_review' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | 'expired', required: `paused` is a resumable session parked between turns; `needs_review` finished without the proof it was asked for; `cancelling` appears only in the `202` answer to a cancel whose sandbox is still being released; `GET` reads `cancelled` once it is.
      - `harness` string: `claude`, `codex` or `opencode`.
      - `agent_id` string, uuid: The saved agent the session was started from, if any.
      - `model` string
      - `effort` string
      - `result` string: The agent's final answer for the last finished turn, in full.
      - `error` object
        - `code` string, required
        - `message` string, required
      - `repo_owner` string
      - `repo_name` string
      - `branch` string
      - `pr_url` string
      - `input_tokens` integer
      - `output_tokens` integer
      - `cache_read_tokens` integer
      - `cache_write_tokens` integer
      - `total_tokens` integer: Uncached input plus cache writes plus output.
      - `reasoning_tokens` integer
      - `total_cost_usd` number
      - `tool_calls_count` integer
      - `turns_count` integer
      - `artifacts` object[]: Every file the agent saved to `/workspace/.rush/artifacts/`. `url` downloads it from this API with no credential until `url_expires_at`, an hour after the read; read the session again for a fresh link. `GET …/artifacts/{name}` with the key also downloads it.
        - `name` string, required
        - `mime_type` string, required
        - `url` string, uri, required: A signed https link to the file on this API.
        - `url_expires_at` string, date-time, required
      - `attachments` object[]: The files the session was started or followed up with. `url` downloads one with no credential until `url_expires_at`, as for artifacts; `GET …/attachments/{id}` with the key also downloads it.
        - `id` string, uuid, required
        - `name` string, required
        - `mime_type` string, required
        - `url` string, uri, required: A signed https link to the file on this API.
        - `url_expires_at` string, date-time, required
      - `created_at` string, date-time
      - `completed_at` string, date-time
  - SessionList
    - `sessions` Session[], required
      - `id` string, required
      - `kind` 'cloud' | 'local'
      - `short_id` string, required: Indexed short handle for prefix resolution.
      - `title` string, nullable
      - `project` string, nullable
      - `org_id` string, uuid, nullable: Owning org; null for older sessions started outside an org.
      - `project_id` string, uuid, nullable: The Project the session ran in; null for a run without one.
      - `agent` string, nullable
      - `harness` 'claude' | 'codex' | 'opencode': Launch-boundary managed harnesses.
      - `harness_version_requested` string, nullable
      - `harness_version_resolved` string, nullable
      - `model` string, nullable
      - `mode` 'headless' | 'interactive' | 'null', nullable
      - `status` 'queued' | 'allocating' | 'running' | 'paused' | 'input_required' | 'needs_review' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | 'expired', required: `paused` is a resumable session parked between turns; `needs_review` finished without the proof it was asked for; `cancelling` appears only in the `202` answer to a cancel whose sandbox is still being released; `GET` reads `cancelled` once it is.
      - `prompt` string, nullable
      - `branch` string, nullable
      - `pr_url` string, nullable
      - `error` string, nullable
      - `session_capture` 'complete' | 'partial' | 'failed' | 'null', nullable
      - `message_count` integer
      - `input_tokens` integer
      - `output_tokens` integer
      - `cache_read_tokens` integer
      - `cache_write_tokens` integer
      - `cost_usd` number
      - `duration_ms` integer, nullable
      - `tool_call_count` integer
      - `started_by` object, nullable: The person who started the run; null for older sessions with no recorded starter.
        - `name` string, nullable
        - `avatar_url` string, nullable
      - `summary` string, nullable: Stored summary or last assistant text line (max 200 chars); null when there is no capture.
      - `artifacts` object[]: First 6 artifact previews from the stored manifest, in upload order (no timestamps, so no recency implied).
        - `name` string, required
        - `size` integer, required
        - `content_type` string, required
      - `artifact_count` integer
      - `agent_profile` object, nullable: The saved agent profile this run was dispatched from; null otherwise.
        - `id` string
        - `name` string
      - `automation` object, nullable: The automation that started this run; null for a run someone started.
        - `id` string
        - `name` string
      - `source` object: Where the run came from, derived from what the run records: an automation, an org API key through MCP or over HTTP (with the key), Slack, a GitHub review, the retired Linear dispatch, or else a person in the console or the `rush` CLI (`console`).
        - `kind` 'console' | 'api' | 'mcp' | 'automation' | 'slack' | 'github' | 'linear', required
        - `key` object: The API key that started an `api` or `mcp` run.
          - `id` string, required
          - `name` string, required
      - `persistence_mode` 'ephemeral' | 'resumable' | 'null', nullable: Whether the session keeps its computer between turns; only a resumable one can be woken by an automation. Null for older rows.
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, nullable
    - `count` integer, nullable: Present (and rows omitted) when the request set `count=true`.
    - `next_cursor` string, nullable
  - Session: A session as the org-wide search (`GET /o/{org}/sessions`) returns it: built for browsing, with a short id, a title and usage totals. Once you have an id, `GET …/sessions/{session}` returns the fuller `CloudRunSession`. `kind` is always `cloud` today.
    - `id` string, required
    - `kind` 'cloud' | 'local'
    - `short_id` string, required: Indexed short handle for prefix resolution.
    - `title` string, nullable
    - `project` string, nullable
    - `org_id` string, uuid, nullable: Owning org; null for older sessions started outside an org.
    - `project_id` string, uuid, nullable: The Project the session ran in; null for a run without one.
    - `agent` string, nullable
    - `harness` 'claude' | 'codex' | 'opencode': Launch-boundary managed harnesses.
    - `harness_version_requested` string, nullable
    - `harness_version_resolved` string, nullable
    - `model` string, nullable
    - `mode` 'headless' | 'interactive' | 'null', nullable
    - `status` 'queued' | 'allocating' | 'running' | 'paused' | 'input_required' | 'needs_review' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | 'expired', required: `paused` is a resumable session parked between turns; `needs_review` finished without the proof it was asked for; `cancelling` appears only in the `202` answer to a cancel whose sandbox is still being released; `GET` reads `cancelled` once it is.
    - `prompt` string, nullable
    - `branch` string, nullable
    - `pr_url` string, nullable
    - `error` string, nullable
    - `session_capture` 'complete' | 'partial' | 'failed' | 'null', nullable
    - `message_count` integer
    - `input_tokens` integer
    - `output_tokens` integer
    - `cache_read_tokens` integer
    - `cache_write_tokens` integer
    - `cost_usd` number
    - `duration_ms` integer, nullable
    - `tool_call_count` integer
    - `started_by` object, nullable: The person who started the run; null for older sessions with no recorded starter.
      - `name` string, nullable
      - `avatar_url` string, nullable
    - `summary` string, nullable: Stored summary or last assistant text line (max 200 chars); null when there is no capture.
    - `artifacts` object[]: First 6 artifact previews from the stored manifest, in upload order (no timestamps, so no recency implied).
      - `name` string, required
      - `size` integer, required
      - `content_type` string, required
    - `artifact_count` integer
    - `agent_profile` object, nullable: The saved agent profile this run was dispatched from; null otherwise.
      - `id` string
      - `name` string
    - `automation` object, nullable: The automation that started this run; null for a run someone started.
      - `id` string
      - `name` string
    - `source` object: Where the run came from, derived from what the run records: an automation, an org API key through MCP or over HTTP (with the key), Slack, a GitHub review, the retired Linear dispatch, or else a person in the console or the `rush` CLI (`console`).
      - `kind` 'console' | 'api' | 'mcp' | 'automation' | 'slack' | 'github' | 'linear', required
      - `key` object: The API key that started an `api` or `mcp` run.
        - `id` string, required
        - `name` string, required
    - `persistence_mode` 'ephemeral' | 'resumable' | 'null', nullable: Whether the session keeps its computer between turns; only a resumable one can be woken by an automation. Null for older rows.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, nullable

## Other responses

- `400`: Malformed request.
- `401`: No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
- `404`: No such resource for the caller, including one in an org the caller is not in or a Project that is private to someone else.
- `409`: The selector matched more than one session.

---

[API](https://skmtc.dev/getrush/apis/rush-api.md) · [All operations](https://skmtc.dev/getrush/apis/rush-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getrush/apis/rush-api/revisions/e351f947926b?raw)
