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

# streamRunEvents

> Gateway RPC for replayable run event streams.

`streamRunEvents` subscribes to per-run events.

* Method: `streamRunEvents`
* Scope: `run:read`
* Transport: WebSocket RPC (streaming only)
* Request: `{ runId, afterSeq? }`
* Response: `{ streamId, runId, afterSeq, currentSeq }`

Errors are versioned as `v1` and include `InvalidRequest`, `Unauthorized`, `Forbidden`, `RunNotFound`, `SeqOutOfRange`, and `Internal`.

* **Reconnect:** pass the last seen `seq` as `afterSeq`.
* **Gap resync:** if `seq` was truncated (default window `10000`), the stream emits `GapResync { fromSeq, toSeq }` with a full run snapshot, then resumes.
* **Heartbeat:** `Heartbeat` frames are emitted separately from event frames.

`SideEffectBoundaryCrossed` rows include `lateCompletion: true` and
`archivedByOp` when applicable after a detached tool completed after its live
journal row was reverted or archived. A still-live row moves to
`revert-stale`.
