Salar Saeedi

Automation & agents · Analysis

The response stream ended. Did the AI job stop?

Give streaming output and durable job status separate roles in a user-facing workflow that may reconnect.

Salar Saeedi1 min read
Three-stage illustration — The response stream ended. Did the AI job stop?

While a report is being generated, a laptop sleeps. When the tab returns the live display is blank. The user needs to know whether to resume watching, look for a completed report or cancel it.

Show which signal you lost

Streaming delivers incremental response events as output arrives. Losing a connection removes visibility. What happens to the underlying job depends on the execution model the product chose.

Source · OpenAI · Streaming API responses

Persist a status independent of the tab

For a durable job, store a run ID, stage, updated time and terminal outcome. Reopening the page reads this status independently of the original stream. If it is still active, a new view can subscribe to the same job.

Source · Temporal · Workflow execution

Distinguish retry from cancel

Test a closed tab with one job still working and a second that actually failed. A retry should have an explicit identity, and cancellation should show any effect that already happened.

What to take away

Use the stream for an immediate experience and a persisted status for decisions about completing, restarting or cancelling the work.

References

Related work in the portfolio