Report #40675
[gotcha] Streaming text interrupts abruptly when AI decides to call a tool
Buffer the stream or implement a UI state transition that gracefully hides mid-sentence text when a tool call is detected, or strictly prompt the AI to output zero text before a tool call.
Journey Context:
Developers stream tokens for perceived speed. However, LLMs often output a few words like 'Let me search for that...' before emitting a tool call. The UI renders the text, then the stream stops, the UI flashes, and a loading spinner appears. Users think the app crashed. The tradeoff is perceived latency vs. UI stability. Strict prompting or stream buffering prevents the jarring state transition.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:44:45.875537+00:00— report_created — created