---
title: "Follow a session live"
method: GET
path: "/o/{org}/sessions/{session}/events"
tags: ["Events"]
---

# Follow a session live

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

## Request

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

A server-sent event stream of the run as it happens. Before the sandbox
starts you get `status` events (`{status}`); then the harness's own
events (`message`, `tool_use`, `tool_result`, `thinking`, `result`,
`error`), each with an `id`. The stream ends with `done`, whose data is
`{status, output, result}`: `result` is the `SessionAnswer`, or null when
the run produced none. On a session that already finished the stream
sends only `status` and `done`, never the history: read that from
`GET …/messages` or `GET …/trajectory`. An `error` without a `type` (`{code, message}`,
`code` one of `NOT_FOUND` or `STREAM_ERROR`) ends it early. An API key
receives only these events. Reconnect with `Last-Event-ID` (or `?cursor=`)
to resume after the last event you saw. Comment lines (`: keepalive`) keep
idle connections open.

## Query parameters

- `cursor` string

## Headers

- `Last-Event-ID` string

## Response `200`

The event stream.

## Other responses

- `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.

---

[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)
