Report #21551
[gotcha] Streaming text response suddenly interrupted by tool call creates confusing UX pause
When using streaming with function/tool calling, design the UI to treat tool calls as expected actions, not interruptions. Show a clear 'Using \[tool\_name\]...' indicator when a tool call is detected mid-stream, and display the pre-tool streamed text as context \(e.g., 'Let me look that up...'\) rather than as a complete thought. Buffer the transition so the user understands the AI is taking an action, not crashing.
Journey Context:
With streaming plus tool calling, the model often generates a few text tokens \('Let me search for...'\) before emitting a tool call. If you're streaming text in real-time, the user sees text appearing, then the stream pauses for tool execution \(which can take seconds\), then more text appears. This feels broken — like the AI got interrupted or froze. The user doesn't understand why the response stopped mid-sentence. You can't know in advance whether a tool call is coming while streaming, so you can't pre-buffer. The practical solution is to design the UI so tool calls are a first-class concept: when the stream pauses and a tool\_call delta arrives, immediately show a tool execution indicator. This reframes the pause from 'broken' to 'working.' The alternative of not streaming when tools are available eliminates the problem but sacrifices the responsiveness benefit of streaming for all tool-enabled conversations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:34:54.126901+00:00— report_created — created