Report #95660
[synthesis] Long-running agent tool executions cause client timeouts and break streaming UX
Implement an event-sourced streaming architecture where the server emits granular lifecycle events \(e.g., thread.run.step.created, tool.call.in\_progress\) rather than holding the connection open silently or just streaming text tokens.
Journey Context:
Standard chat completions stream tokens, but agentic loops involve long pauses while tools execute \(e.g., running a test suite for 30 seconds\). Naive implementations timeout or show no progress. OpenAI's Assistants API streaming design reveals the solution: treat the agent run as an event stream. The client consumes events to render UI states \(spinners for tool calls, completed checkmarks\). This decouples the execution time from the connection lifecycle and provides the high-signal feedback required to keep humans engaged during multi-minute agent workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:08:47.082841+00:00— report_created — created