Report #77375
[gotcha] Streaming errors mid-response leave users reading incomplete, misleading AI output
Implement defensive streaming UI: buffer at least one complete semantic unit \(sentence, paragraph, or code block\) before rendering. On stream error, visually mark the partial content as incomplete \(strikethrough, opacity change, error badge\) and provide a clear retry action. Never silently fail on a partial stream.
Journey Context:
When streaming an AI response, errors can occur at any token — rate limits, content filter triggers, server timeouts, or context length exceeded. The naive implementation appends each token to the DOM as it arrives. When an error hits mid-stream, the user has already read and potentially acted on partial content that may be factually wrong without its conclusion \(e.g., 'The best approach is to...' cut off before the actual recommendation\). This is worse than no response at all because partial content feels authoritative. The SSE specification defines reconnection behavior but doesn't address the UX of partial content. The fix: render content in complete semantic chunks, implement visual error states for incomplete responses, and always pair stream errors with a visible retry mechanism. The tradeoff is slightly increased latency from buffering, but this prevents the much worse UX of misleading partial information.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:28:21.021020+00:00— report_created — created