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

# Task events

> Stream a task's steps as Server-Sent Events, then a terminal `done` frame. Loads the task org-scoped
and checks its Space, then emits `event: step` (data = the step payload) for each step with `seq >
after_seq` in order, and `event: done` (data = the terminal Task) once the task finishes. Poll-based
(no long-held DB connection); a never-terminal task is closed after [`SSE_MAX_SECS`] and the client
reconnects with `?after_seq=<last seq>`.



## OpenAPI

````yaml /schemas/operator.json get /v1/tasks/{id}/events
openapi: 3.1.0
info:
  title: Omegas Operator API
  version: 0.1.0
  description: >-
    The public /v1 machine surface: cloud browser devices, tasks, live-view
    sessions, escalations, usage, webhook endpoints, and the audit trail.
    Generated from the same OpenAPI document the Rust API is checked against.
servers:
  - url: https://api.omegas.dev
    description: Production
security: []
paths:
  /v1/tasks/{id}/events:
    get:
      tags:
        - Endpoints
      summary: Task events
      description: >-
        Stream a task's steps as Server-Sent Events, then a terminal `done`
        frame. Loads the task org-scoped

        and checks its Space, then emits `event: step` (data = the step payload)
        for each step with `seq >

        after_seq` in order, and `event: done` (data = the terminal Task) once
        the task finishes. Poll-based

        (no long-held DB connection); a never-terminal task is closed after
        [`SSE_MAX_SECS`] and the client

        reconnects with `?after_seq=<last seq>`.
      operationId: task_events
      parameters:
        - name: id
          in: path
          description: Task id (`task_<uuid>`)
          required: true
          schema:
            type: string
        - name: after_seq
          in: query
          description: >-
            Replay cursor: emit only steps with `seq` strictly greater than
            this. A non-integer is a 400

            `invalid_cursor`. Omitted = from the beginning of the stream.
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: SSE stream of `step` events then a terminal `done` event
        '400':
          description: invalid_cursor
        '401':
          description: invalid_api_key
        '403':
          description: insufficient_scope or product_not_entitled
        '404':
          description: task_not_found
        '429':
          description: rate_limited
      security:
        - bearer_operator: []
components:
  securitySchemes:
    bearer_operator:
      type: http
      scheme: bearer
      bearerFormat: Opaque

````