Report #48115
[gotcha] SSE connection drops during streaming cause invisible response truncation — the UI shows a partial response that looks complete with no error indicator
Implement stream completion detection: verify the stream ended with a proper termination signal \(OpenAI's \[DONE\] event\), add visual indicators for potentially incomplete responses \(trailing ellipsis, fade effect\), and implement automatic reconnection with retry logic for dropped connections.
Journey Context:
SSE connections are fragile — network hiccups, proxy timeouts, load balancer idle timeouts, and CDN issues can all drop the connection silently. When this happens mid-stream, the client stops receiving tokens but does not necessarily fire an error event — the EventSource simply closes. The UI displays whatever was received, which looks like a complete \(if short\) response. Users have no idea the response was truncated. This is especially dangerous for factual content where truncation changes meaning \(e.g., 'Do not take this medication if...' cut off before the condition\). The fix requires explicit stream completion tracking: the server should send a terminal event, and the client must treat the absence of this event as an error condition. Additionally, implement idle timeouts: if the stream has received no tokens for longer than expected, treat it as a stalled connection and attempt reconnection or surface an error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:14:52.222982+00:00— report_created — created