Server-Sent Events stream of run output

Returns a long-lived `text/event-stream` connection.

GET /api/v1/runs/{runId}/stream

Returns a long-lived text/event-stream connection.

Event types

  • output{ "data": string } — terminal output chunk.
  • status{ "status": "running"|"sleep", "claudeStatus": string|null }.
  • claude_status{ "status": "working"|"idle"|"waiting"|"error" }.
  • finished{ "sessionId": string, "reason"?: string, "exitCode"?: number } — stream then closes.
  • filetree[{ name, path, type, children? }] — filetree snapshot.

A : ping comment is sent every 15 s to keep proxies from closing the connection.

Browser EventSource clients can authenticate via ?api_key=....

Authentication

Requires a project API key — see Authentication.

Parameters

NameInTypeRequiredDescription
runIdpathstringrequiredUUID of the run.

Responses

StatusDescription
200Event stream.
404Resource not found or not accessible to this project.

Tag: Streaming