Why Do I See "An Unexpected Error Occurred" in Agent Chat? Is My Response Lost?

Last updated: May 19, 2026

This usually means a single chunk of your agent's response failed to render in your browser — not that the work was lost. Refresh the page first. If your agent finished on our side (most common after long responses), the full reply is saved and will reappear automatically. Do not resend until you've tried refresh.


Symptoms

  • You see An unexpected error occurred inline in the agent chat, often replacing the tail end of a long response.

  • The agent appeared to be working for a while (sometimes several minutes) before the message appeared.

  • The chat may look like it cut off mid-answer or shows only the agent's earlier reasoning steps.

Cause

Agent responses stream to your browser in chunks over a WebSocket connection so text appears in real time. The An unexpected error occurred message appears when one chunk of the stream fails to arrive or render — it does not mean your agent's run failed.

In most cases the backend finishes the work in full and saves the complete response server-side. The failure is in the last-mile delivery of one chunk to your screen, which is why this surface shows up most often at the tail end of long responses (heavy multi-step research, large reports, long tool chains) where the stream has more chances to hiccup.

How to Fix It

  1. Refresh the page first. When the chat loads, Gumloop refetches your full saved interaction from the server. If your agent finished on our side, the rehydrated response replaces the error inline and your complete answer appears in the chat right where it left off.

  2. Only resend if refresh shows nothing. If after refreshing the chat is empty, cuts off early, or shows no agent response at all, then the run genuinely failed and you should retry the request.

  3. For very long asks, break them into smaller messages. A single 10-minute, multi-step request streams thousands of chunks and has more chances of a tail-end drop. Splitting it into a few follow-up messages (the agent keeps context between them) makes each response shorter, faster, and more recoverable. You can also tell the agent to save its work to a file as it goes.

  4. If the same agent keeps hitting this, send the agent or chat link to support@gumloop.com so we can pull the server-side traces and confirm whether your runs are completing.

How Do I Know It Worked?

After refreshing, you should see the complete agent response in place of the error. If your credit balance on Settings → Usage reflects a deduction that matches the size of the run, that's confirmation the backend completed and the response you're now seeing is the persisted final output.

Related Docs

Still Need Help?

If this didn't resolve your issue, reach out to support at support@gumloop.com.