Report #47106
[gotcha] Long streaming responses silently drop the SSE connection, leaving users with an incomplete response and no error indication
Implement explicit timeout detection for streaming responses. If no chunk arrives within a threshold \(e.g., 30 seconds\), treat the stream as dropped. Show the user that the response was interrupted and offer a retry affordance. Never assume the stream will complete cleanly.
Journey Context:
Server-Sent Events connections are long-lived HTTP connections that can be dropped by proxies, load balancers, CDNs, or network interruptions — especially for long-running streaming responses. When the connection drops, the browser's EventSource or fetch reader simply stops receiving chunks with no error event in many cases. The UI shows whatever was received so far, and the user sees an incomplete response that looks like it might just be slow — they wait, and wait, not realizing the connection is dead. This is particularly bad for long code generations or detailed explanations. The fix requires active monitoring: track the time since the last received chunk, and if it exceeds a threshold, declare the stream broken. Then surface this to the user with a clear 'connection lost' message and a way to retry. The subtle part: the threshold must account for legitimate pauses \(e.g., the model pausing during complex reasoning\) vs actual connection drops, so tune it to your typical inter-chunk timing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:32:15.396865+00:00— report_created — created