# Get one session

`GET /o/{org}/sessions/{session}`

## 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`. |
| `session` | path | string | yes | The session's full id (`execution_id`). |

## Example request

```bash
curl "https://api.phoenix.so/o/$RUSH_ORG/sessions/$SESSION_ID" \
  -H "Authorization: Bearer $RUSH_API_KEY"
```

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

const res = await fetch(`https://api.phoenix.so/o/${org}/sessions/${sessionId}`, {
  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"]
session_id = os.environ["SESSION_ID"]

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

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

## Responses

### 200

The session.

- `execution_id` (string, required): The session id.
- `org_id` (string, required): The org as the request's path named it.
- `project_id` (string, optional): The Project the console ran the session in.
- `status` (string, required, one of `queued`, `allocating`, `running`, `paused`, `input_required`, `needs_review`, `completed`, `failed`, `cancelling`, `cancelled`, `expired`): `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, optional): `claude`, `codex` or `opencode`.
- `agent_id` (string, optional): The saved agent the session was started from, if any.
- `model` (string, optional)
- `effort` (string, optional)
- `result` (string, optional): The agent's final answer for the last finished turn, in full.
- `turn` (object, optional): Only on a follow-up's answer: the turn the message opened, `running` or waiting in line (`queued`).
  - `id` (string, required)
  - `status` (string, required, one of `running`, `queued`)
- `recap` (object, optional): What the last finished turn did, written from `result` when it finished: the line Rush's notifications lead with. Absent when the turn left no answer.
  - `headline` (string, required)
  - `points` (array of string, optional)
- `error` (object, optional): Why a `failed` or `expired` run ended. `message` is a sentence a person can act on.
  - `code` (string, required): A plan or account limit the run hit (`FREE_TRIAL_USED`, `PLAN_REQUIRED`, `TOKEN_LIMIT_REACHED`, `CREDITS_EXHAUSTED`, `SPEND_CAP_REACHED`, `COMPUTE_LIMIT_REACHED`, `WEEKLY_COMPUTE_LIMIT_REACHED`, `PAYMENT_METHOD_REQUIRED`), the model account it used (`PROVIDER_AUTH_FAILED`, `PROVIDER_RATE_LIMITED`, `MODEL_ACCOUNT_MISSING`), Rush's own model provider refusing its calls (`RUSH_MODELS_UNAVAILABLE`), how it ended (`HARNESS_EXITED`, `RUN_STALLED`, `RUN_TIMED_OUT`, `RUN_START_FAILED`, `MACHINE_UNAVAILABLE`, `MACHINE_REFUSED`, `MACHINE_LOST`, `LEASE_EXPIRED`, `SAVED_STATE_EXPIRED`, `BRANCH_NOT_FOUND`, `AGENT_UNAVAILABLE`, `CONNECTION_UNAVAILABLE`, `AUTH_FAILED`), or `RUN_FAILED`. Runs that failed before codes were recorded read `RUN_FAILED`.
  - `message` (string, required)
- `repo_owner` (string, optional)
- `repo_name` (string, optional)
- `branch` (string, optional)
- `pr_url` (string, optional)
- `input_tokens` (integer, optional)
- `output_tokens` (integer, optional)
- `cache_read_tokens` (integer, optional)
- `cache_write_tokens` (integer, optional)
- `total_tokens` (integer, optional): Uncached input plus cache writes plus output.
- `reasoning_tokens` (integer, optional)
- `total_cost_usd` (number, optional)
- `tool_calls_count` (integer, optional)
- `turns_count` (integer, optional)
- `artifacts` (array of object, optional): 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, required): A signed https link to the file on this API.
  - `url_expires_at` (string, required)
- `attachments` (array of object, optional): 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, required)
  - `name` (string, required)
  - `mime_type` (string, required)
  - `url` (string, required): A signed https link to the file on this API.
  - `url_expires_at` (string, required)
- `accounts` (array of object, optional): The connections the session's tokens acted as, one entry per account however often it was used, with when it was first used: a signed-in app account (`oauth`) or an MCP server signed as one person (`mcp`); a connection added to the Project for its members is not listed, so its sessions stay readable by the team. The session's `agent_id` says whose agent it was. Absent when the session used none, and for sessions started before accounts were recorded. Never a token.
  - `kind` (string, required, one of `oauth`, `mcp`)
  - `vendor` (string, required): For `oauth` the app vendor (`google`, `microsoft`, `buffer`, `quickbooks`); for `mcp` the server's name.
  - `account` (string, required): For `oauth` the account's email (for QuickBooks, the company's realm id); for `mcp` the connection's id, or the server's host when the session supplied its own token.
  - `products` (array of string, optional): The account's products the session reached, such as `gmail` or `outlook`. Absent for `mcp`.
  - `first_used_at` (string, required)
- `created_at` (string, optional)
- `completed_at` (string, 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 in an org the caller is not in or a Project that is private to someone else.

### 429

The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (`RATE_LIMITED`). The error names the limit. Wait `Retry-After` seconds.

## Example response (200)

```json
{
  "execution_id": "7c1e9a4f-2b6d-4f83-a5c0-9e3d1b8f6a24",
  "org_id": "acme",
  "project_id": "7d2e9a14-5b3c-4f60-8e21-9a0b1c2d3e4f",
  "status": "completed",
  "harness": "claude",
  "model": "claude-opus-5-5",
  "effort": "high",
  "result": "Pinned the clock in checkout.spec.ts and opened PR 412.",
  "repo_owner": "acme",
  "repo_name": "web",
  "branch": "rush/fix-flaky-checkout",
  "pr_url": "https://github.com/acme/web/pull/412",
  "input_tokens": 182340,
  "output_tokens": 9120,
  "cache_read_tokens": 1204500,
  "cache_write_tokens": 40210,
  "total_tokens": 231670,
  "total_cost_usd": 1.84,
  "tool_calls_count": 37,
  "turns_count": 1,
  "artifacts": [
    {
      "name": "coverage-report.html",
      "mime_type": "text/html",
      "url": "https://api.phoenix.so/o/acme/sessions/7c1e9a4f-2b6d-4f83-a5c0-9e3d1b8f6a24/artifacts/coverage-report.html?expires=1791306543&signature=9b1f…",
      "url_expires_at": "2026-10-06T16:09:03.000Z"
    }
  ],
  "created_at": "2026-10-06T15:02:11.000Z",
  "completed_at": "2026-10-06T15:09:03.000Z"
}
```
