When the stream drops, and what your agent says while it works
Guuey's chat now recovers a reply whose stream was cut by reading the saved conversation, and it draws an OpenAI agent's running commentary as a status line, in the widget and in @guuey/chat 0.30.0.
Read as .mdGuuey’s chat now recovers a reply whose stream was cut: when the connection drops before your agent’s turn ends, it checks the saved conversation and shows the finished answer if it is there. The same release draws an OpenAI agent’s running commentary as a quiet status line instead of inside the answer, for visitors on your widget and for anyone embedding the chat in their own app.
On Guuey’s own surfaces (the widget on your landing page and the portal at app.guuey.com) both changes are already live. In your own app they arrive with version 0.30.0 or later of the two SDK packages:
npm install @guuey/chat @guuey/agent-client
When the stream drops
A reply streams to the browser over one long connection, and long connections get cut: a proxy times out, a laptop changes networks, the agent’s pod restarts mid-turn. Until this release, a stream that closed without its end frame put the chat back in its ready state with no error, so a cut turn looked finished and whatever half of the reply had arrived stood as the answer.
Now the chat treats that close as unfinished. It reads the saved thread straight away. The agent can finish saving its reply after the cut, so when the first read misses, the chat waits one stall window (25 s by default) and reads once more. If the finished reply is there, your visitor sees it as if it had streamed. If it isn’t, the turn ends with an error, and your code gets errorCode: "STREAM_TRUNCATED", which is your cue to offer a retry. A failure the agent already reported inside the stream keeps its own words and code.
The recovery needs somewhere to read the thread from. <GuueyChat> has that when you pass it apiBaseUrl. A host that builds its own adapters without a history adapter sees the turn fail at the close, with the same code. The wait is stallRecovery.windowMs, and this check runs even with stallRecovery switched off. The SDK docs describe it under Cut streams.
What the agent says while it works
Some models talk between steps. An OpenAI agent can send a line like “Let me check the calendar.” before it calls a tool, and that line used to render as the start of the answer, in the same bubble as the reply that followed. The chat now draws it in the status line’s voice: muted, smaller, outside the bubble, and kept in the transcript, so the conversation reads the way it happened.
It holds after a reload too. Guuey now stores that narration apart from the answer, so a reopened thread draws the same status lines the live one did, and anything that reads the saved reply (a preview, a hook) gets the answer alone.
Claude and Gemini agents don’t mark any of their text as narration, so their chats show the tool status lines and the answer exactly as before. The status-line narration comes from OpenAI agents. The chat kit page lists the rest of the chat’s defaults.
Guuey is in public beta preview, and if one of your streams gets cut and the reply still doesn’t come back, tell us on Discord what the agent was doing, because that is the case this was built for.