Report #46256
[gotcha] Streaming response cancellation corrupts subsequent conversation turns
On stream cancellation, explicitly finalize or discard the partial assistant message from the conversation history before the next user turn. Never pass a truncated assistant message back to the model as context.
Journey Context:
Engineers implement stream cancellation as simply closing the connection, assuming it is a client-side concern. But if the partial assistant message persists in the conversation history sent to the model on the next turn, the model sees an incomplete message and generates confused, contradictory, or degraded responses because it treats the partial message as a complete assistant turn. The fix is to either append a stop sequence and treat it as a complete but short turn, or strip it entirely from context. Stripping is usually safer because partial messages often end mid-sentence, producing incoherent context that derails the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:06:53.477444+00:00— report_created — created