# List sessions in one Project

`GET /o/{org}/p/{project}/sessions`

Newest first, at most 100. With `{project}` = `_`, every session in the
org the caller can read. Rows are `CloudRunSession`, the same shape a
create or a single read returns, unlike `GET /o/{org}/sessions`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org` | path | string | yes | The org's slug or id. A caller with no role in the org gets `404`. |
| `project` | path | string | yes | A Project's handle (name) or id, resolved inside `{org}` — OR the reserved sentinel `_` meaning "no Project" (a direct-repo / repo-less dispatch on `POST`; "no Project constraint, resolve by session id alone" everywhere else). A real handle that doesn't match the session's actual Project is `404`.  |
| `status` | query | string | no |  |
| `limit` | query | integer | no |  |

## Example request

```bash
curl "https://api.prix.dev/o/$RUSH_ORG/p/_/sessions" \
  -H "Authorization: Bearer $RUSH_API_KEY"
```

```typescript
const org = process.env.RUSH_ORG;

const res = await fetch(`https://api.prix.dev/o/${org}/p/_/sessions`, {
  headers: {
    Authorization: `Bearer ${process.env.RUSH_API_KEY}`,
  },
});

console.log(res.status, await res.json());
```

```python
import os

import requests

org = os.environ["RUSH_ORG"]

res = requests.get(
    f"https://api.prix.dev/o/{org}/p/_/sessions",
    headers={"Authorization": f"Bearer {os.environ['RUSH_API_KEY']}"},
)

print(res.status_code, res.json())
```

## Responses

### 200

Sessions in this Project.

- `executions` (array of CloudRunSession, required)
  - `execution_id` (string, required)
  - `kind` (string, required, one of `cloud`, `local`)
  - `org_id` (string | null, optional)
  - `project_id` (string | null, optional)
  - `agent` (string | null, optional): The harness.
  - `status` (string, required, one of `queued`, `allocating`, `running`, `paused`, `input_required`, `needs_review`, `completed`, `failed`, `cancelled`, `expired`): `paused` is a resumable session parked between turns; `needs_review` finished without the proof it was asked for.
  - `persistence_mode` (string | null, optional, one of `ephemeral`, `resumable`, `null`)
  - `machine_state` (string | null, optional): The sandbox's own lifecycle (preparing, running, pausing, paused, resuming…), separate from `status`.
  - `sandbox_generation` (integer | null, optional): Increments on every resume.
  - `prompt` (string | null, optional)
  - `repo_owner` (string | null, optional)
  - `repo_name` (string | null, optional)
  - `branch` (string | null, optional)
  - `pr_url` (string | null, optional)
  - `summary` (string | null, optional)
  - `error` (string | null, optional)
  - `started_by` (object | null, optional)
    - `name` (string | null, optional)
    - `avatar_url` (string | null, optional)
  - `input_tokens` (integer | null, optional)
  - `output_tokens` (integer | null, optional)
  - `cache_read_tokens` (integer | null, optional)
  - `cache_write_tokens` (integer | null, optional)
  - `total_tokens` (integer | null, optional): Uncached input plus cache writes plus output; null when the run reported none.
  - `reasoning_tokens` (integer | null, optional)
  - `total_cost_usd` (number | null, optional)
  - `model` (string | null, optional)
  - `tool_calls_count` (integer | null, optional)
  - `tool_errors_count` (integer | null, optional)
  - `turns_count` (integer | null, optional)
  - `files_produced` (integer | null, optional)
  - `attachments` (array of object, optional): Files the caller attached when starting the run.
    - `id` (string, required)
    - `name` (string, required)
    - `mime` (string, required)
    - `size` (integer, required)
    - `expired_at` (string | null, required)
  - `artifacts` (array of ArtifactFile, optional): The first 6 artifacts; `artifact_count` has the total.
    - `name` (string, required)
    - `size` (integer, required): Bytes.
    - `content_type` (string, required)
  - `artifact_count` (integer, optional)
  - `harness_version_requested` (string | null, optional)
  - `harness_version_resolved` (string | null, optional)
  - `profile_id` (string | null, optional): The saved agent the run started from.
  - `profile_revision` (integer | null, optional)
  - `profile_digest` (string | null, optional)
  - `requested_overrides` (object | null, optional)
    - `model` (string, optional)
    - `effort` (string, optional)
    - `speed` (string, optional)
  - `agent_profile` (object | null, optional)
    - `id` (string, optional)
    - `name` (string, optional)
  - `effective` (object | null, optional): What a saved-agent run actually ran with.
    - `model` (string | null, optional)
    - `effort` (string | null, optional)
    - `speed` (string | null, optional)
    - `harness_version` (string | null, optional)
    - `catalog_revision` (string | null, optional)
    - `image_digest` (string | null, optional)
  - `snapshot` (object | null, optional): The saved-agent configuration the run was pinned to.
  - `effective_config` (object | null, optional): What the sandbox loaded (harness version, plugins, hooks, commands), as the runtime reported it.
  - `session_capture` (string | null, optional, one of `complete`, `partial`, `failed`, `null`)
  - `created_at` (string, required)
  - `updated_at` (string | null, optional)

### 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 that exists in an org the caller cannot see.

## Example response (200)

```json
{
  "executions": [
    {
      "execution_id": "3f9c2a71d04b8e65",
      "kind": "cloud",
      "org_id": "0b6f3c52-8d1e-4a7b-9c55-2f1e8d7a6b90",
      "project_id": "7d2e9a14-5b3c-4f60-8e21-9a0b1c2d3e4f",
      "agent": "claude",
      "status": "completed",
      "persistence_mode": "resumable",
      "machine_state": "paused",
      "sandbox_generation": 1,
      "prompt": "Fix the flaky checkout test and open a PR.",
      "repo_owner": "acme",
      "repo_name": "web",
      "branch": "rush/fix-flaky-checkout",
      "pr_url": "https://github.com/acme/web/pull/412",
      "summary": "Pinned the clock in checkout.spec.ts and opened PR 412.",
      "error": null,
      "started_by": {
        "name": "Dana Lee",
        "avatar_url": null
      },
      "input_tokens": 182340,
      "output_tokens": 9120,
      "cache_read_tokens": 1204500,
      "cache_write_tokens": 40210,
      "total_tokens": 231670,
      "reasoning_tokens": 0,
      "total_cost_usd": 1.84,
      "model": "claude-opus-5-5",
      "tool_calls_count": 37,
      "tool_errors_count": 2,
      "turns_count": 1,
      "files_produced": 1,
      "attachments": [],
      "artifacts": [
        {
          "name": "coverage-report.html",
          "size": 48213,
          "content_type": "text/html"
        }
      ],
      "artifact_count": 1,
      "harness_version_requested": null,
      "harness_version_resolved": "2.1.291",
      "profile_id": null,
      "profile_revision": null,
      "profile_digest": null,
      "requested_overrides": null,
      "agent_profile": null,
      "effective": null,
      "snapshot": null,
      "effective_config": {
        "harness_version": "2.1.291"
      },
      "session_capture": "complete",
      "created_at": "2026-10-06T15:02:11.000Z",
      "updated_at": "2026-10-06T15:09:03.000Z"
    }
  ]
}
```
