> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

> A session's events are numbered by `seq` from 1 with no gaps; read them over HTTP or follow them on Live

```json theme={null}
{"id":"ev_0123456789abcdef","seq":412,"createdAt":"2026-01-01T12:00:00.000Z","sessionId":"cs_0123456789abcdef","turnId":"tn_0123456789ab","actor":{"id":"usr_...","name":"Ada","via":"opc","client":"opc/0.1.0"},"type":"message.received","data":{"input":"Add a test for the empty case","ifBusy":"steer","delivery":"steered","interruptedTurnIds":[],"declinedAskIds":[]}}
```

`actor` is who caused the event (`via` is `slack`, `opc`, `dashboard` or `api`), or null. Event types and their `data` fields: [API schema](https://docs.opencomputer.dev/reference/api-schema.md#events). A client must ignore types it does not know.

## Read a range

`events.list` (`GET /sessions/{id}/events`) returns events in `seq` order. To follow a session over HTTP, read it every few seconds from the last cursor; to see events the moment they are recorded, use [Live](https://docs.opencomputer.dev/api/live.md).

```
GET /sessions/cs_0123456789abcdef/events?after=<cursor>&limit=100&types=turn.*,ask.opened
```

| Param | Meaning |
| - | - |
| `after` | The `cursor` of the previous page: return the events after it. Omit to start at the beginning of the journal. A cursor is opaque: store it and send it back, never build one |
| `limit` | 1 to 500 events. Default 100 |
| `tailTurns` | Start at the last 1 to 50 turns instead; `earlierTurns` in the result holds the turns before them. Cannot be combined with `after` |
| `turnId` | Only events of this turn |
| `types` | A comma-separated list of types. A trailing `*` matches a prefix |

The result is `events`, `cursor` (after the last event returned, or the one sent when there is none), `lastSeq` (the journal's last `seq`), `hasMore`, and `earlierTurns` with `tailTurns`. Send `cursor` as the next `after`, whether or not `hasMore` is true. With a filter, the page may be shorter than the range it covered.

| Error | Cause | What to do |
| - | - | - |
| `409 reset` | `after` is not a cursor of this session's events (a bare `seq` included), or its position no longer exists: past the journal's end, or the journal was rebuilt | The error carries `cursor` and may carry `seq`. Drop held events above `seq` and read on from `cursor`; with `cursor: null`, start again without `after` |

## Follow live

Subscribe to `events:<id>` on [Live](https://docs.opencomputer.dev/api/live.md) with the last cursor. Live pushes each new range of events; a client reads over HTTP whenever a pushed range does not start at its cursor. Deltas (`deltas:<id>`) carry text and tool output as they are written: no `seq`, not stored, not replayed, and each block is followed by an event with the whole text (`message.completed`, `reasoning.completed`, `tool.completed`). Types: [API schema](https://docs.opencomputer.dev/reference/api-schema.md#deltas).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.