Report #85927
[gotcha] Streaming AI response fails mid-stream — partial content disappears
Persist every streamed token to application state immediately as it arrives. On stream error, render the accumulated partial response with an inline error indicator \(e.g., 'Response interrupted'\) and a retry action. Never discard partial content on error.
Journey Context:
The common pattern is to buffer streaming chunks and only commit to state on successful stream completion. This feels clean but is catastrophic on failure — the user watches text appear for 10\+ seconds, then it all vanishes into a generic error toast. The counter-intuitive insight: partial AI output is usually valuable. The first 80% of a generated explanation or code snippet is often sufficient for the user's need. The tradeoff is that showing partial content with an error badge might look broken, but showing nothing after a long wait feels like a betrayal of the user's time investment. The partial-content-with-indicator pattern respects the user's time and gives them agency to decide if what they have is enough.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:49:07.584550+00:00— report_created — created