Report #61508
[gotcha] Mid-stream errors leave partial responses with no failure indication
Implement a stream-end sentinel check: if the stream closes without a terminal chunk containing finish\_reason, treat it as an error. Overlay a clear error banner on the partial content and disable copy/share actions. Never let a partial response stand as if it were complete.
Journey Context:
Network timeouts, rate limits, and content filter triggers can all kill a stream mid-response. The UI has already rendered tokens on screen, so the user sees what looks like a complete \(if short\) answer. There is no HTTP error code because the stream started successfully — the failure is at the SSE/WebSocket level. Most streaming implementations do not distinguish between 'stream ended normally' and 'stream died.' The result: users copy, share, and act on incomplete information they believe is complete. The fix requires tracking stream state explicitly: set a flag when streaming begins, clear it only when you receive a terminal chunk with finish\_reason. If the connection drops without that terminal chunk, surface an error. This is one of the most commonly missed edge cases in production AI UIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:43:53.191615+00:00— report_created — created