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

# Stream an execution

> Re-attach to a running execution (SSE).


## OpenAPI

```yaml openapi.json get /v1/executions/{id}/stream
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.3.1
servers:
  - url: https://api.plungeai.com
paths:
  /v1/executions/{id}/stream:
    get:
      operationId: get-v1-executions-id-stream
      tags:
        - Executions
      summary: Re-attach to a running execution (SSE)
      description: "Events: `status` (first, then on change), `progress` (one per interior step record of the tasks named in `task`, polled every 250 ms), `done` (terminal, or the run paused for the user, or `reattach: true` after 5 min), `error` (the run vanished mid-stream, e.g. deleted: one event, then the stream closes). A `: ping` comment every 15 s. A re-attach replays the progress records. Interior records exist for runs started with progress watching (async, MCP, Studio, scheduler runs); a plain synchronous REST run writes none and streams status only."
      security:
        - ozkBearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Execution id (the x-execution-id of the run, or its engine id `exec-…`)
        - name: task
          in: query
          schema:
            type: array
            items:
              type: string
            maxItems: 4
          description: Task ids whose progress records to follow (repeat the parameter, or comma-separate)
      responses:
        "200":
          description: Server-sent events
          content:
            text/event-stream:
              schema:
                type: string
        "400":
          description: "invalid_task — more than 4 ids, or an id with other than letters, digits, . : _ -"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: unauthorized — missing, invalid or revoked ozk_ key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "execution_not_found — no execution with that id for this key (a foreign id answers the same); not_found — no route for this method on this path: every other method answers it"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "409":
          description: execution_finished — the run is already terminal, nothing to steer or attach to
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: too_many_streams — a run takes at most 5 live streams at once; close one
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "502":
          description: upstream_error — a store failed; no detail is returned, retry shortly
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Error:
      type: object
      description: Standard error envelope. Every error response also carries an `X-Error-Code` response header equal to error.code, so a client branches on the header regardless of the negotiated body format (json | yaml | markdown | text). When the request created an execution, the `X-Execution-Id` response header is also set. Errors follow the negotiated format like success bodies.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            connect:
              type: object
              description: "On a 424 connection_required / credential_required: where the missing connection is made."
              properties:
                provider:
                  type: string
                method:
                  type: string
                  enum:
                    - oauth
                    - api_key
                    - wallet
                link:
                  type: string
                  example: POST /v1/connections/stripe/link
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
```
