Choose live or historical reading
Usefollow=1 to send available events and continue following an active operation. Use follow=0 to read only the events currently available. Following requires the operation’s spawn permission in addition to baseline list permission because the server keeps subscription state.
Every normal frame has an id, an event name, and JSON data. Keepalive comments start with : and contain no application event. An sse_error frame reports an in-band stream failure after HTTP 200 has already been sent.
The JSON object identifies the process with spid. The primary process is spid=1; additional subprocesses use spid values of 2 or greater. Add spid=<id> to the query when only one process is relevant.
Decode output as it arrives
Forstdout and stderr events, inspect data.encoding before displaying data.value. Decode base64 values to bytes. An ascii value can be displayed as text. Preserve the channel label: stderr is useful even when the process ultimately succeeds.
Output chunks reflect process writes and buffering. They are not guaranteed to align with application lines. Ordering is represented by the event IDs in the combined stream; do not infer a stronger ordering guarantee between the operating system’s stdout and stderr streams.
Commit a resumable cursor
Parse a complete SSE frame, validate its JSON, perform the application’s side effect, and only then save its event ID. The saved ID means “fully processed,” not merely “received from the socket.” If the connection breaks halfway through a frame, leave the cursor unchanged. Reconnect with the last successfully processed ID:Separate stream completion from execution success
Anexit event reports that a process ended. A completion event describes operation completion. Neither replaces the final status query. After the stream closes, query GET /operations/{operationId} and check the terminal operation status, primary process exit code, signal, timeout flag, truncation flags, and any operation error.
If recorded output is truncated, the stream is not an unlimited log store. Use the final result and a retained file artifact when the workload requires complete output, subject to the documented retention rules.
Recover observation failures
The SSE endpoint reference defines the wire format, query parameters, permissions, event schemas, and errors. The streaming recipe demonstrates progressive output, deliberate disconnect and resume, a successful test run, and a test run whose process exits nonzero.