Skip to content

Coming back to a conversation whose run failed says so, with Carry on - #2931

Merged
davidmckayv merged 1 commit into
mainfrom
fix/stopped-run-carry-on
Dec 4, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/stopped-run-carry-on

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What and why

Found on OpenBot Cloud, 2026-12-04, on a phone. A person asked a Bot to check his calendar and draft two messages, then went to start another conversation while it worked. Two minutes in, the Bot's model connection dropped and the run ended with an error. When he came back, the conversation ended on the Bot's last line ("I'll check options for both days so the drafts are clear.") with no notice, no Carry on and nothing working. It looked as if the Bot had promised more work and stopped.

The error is not in the conversation's stored messages, only in the run's events. The agent the app keeps for the conversation had heard it. But the app only says a failure again after a join that finished, and the join that resumed the thread on his return took longer than its 1.5 second deadline. So the failure was dropped.

Now, when that join doesn't finish and hears no run of its own, the app takes the last run the kept agent heard. If the server says no run is going and that run didn't finish, the app says the failure again, with Carry on where the failure offers it. This runs after the history is in, so opening the conversation never waits for it. The same applies to every Bot, built-in or connected over AG-UI: the kept agent is the app's proxy to the runtime, not anything of the Bot's own.

It also fixes a small slip beside it: a failure said again from the kept agent's record kept its code (BOT_KEY_REFUSED draws the way to the key). It used to take the code from the replay's record, which had none.

How the leaders do it

Most of them keep the work and show the error on the turn with one way on, and it is still there when you come back. OpenBot already did this live and after a full reload. This makes coming back to the conversation in the same page do the same.

Tests

app/tests/stopped-turn-return-browser.test.tsx, new, in a real browser (added to CI's real-browser list):

  • The real conversation is served by a real HTTP server standing in for the API and the runtime. The person sends a message and the Bot says its line and takes a step. The person goes elsewhere in the app, and three seconds later the model's stream breaks and the run ends "The connection to OpenAI dropped. Ask the Bot to carry on."
  • Coming back with a slow join, the notice and Carry on are there. After a reload they are there too.
  • It runs in Chromium and WebKit, light and dark, at 390 px and 1280 px.

Red/green, locally:

  • Without the fix: 0 pass, 8 fail. The conversation comes back exactly as the person saw it: the Bot's promise is the last line, there's no notice, and the composer is open.
  • With the fix: 8 pass.
  • The neighbouring tests still pass, in happy-dom and in a real browser, in Chromium and WebKit. Those are channel-failed-run-restore, kept-agents, conversation-switch, carried-turn, channel-join-replay, conversation-reopen-end, long-turn-reopen and stopped-turn, plus stopped-turn-dismiss, reload-keeps-answer and carry-on-carried-turn in the browser.

The notice and Carry on are the existing ones and their design is unchanged. They are now also drawn in this case.

Not covered here: a full reload whose replay is slower than the deadline still can't say how the last run ended. Nothing the app has names that run, so it needs the server to tell it the conversation's last run. That is a follow-up.

Changelog

Web app and OpenBot Desktop.

  • Fixed: coming back to a conversation whose Bot stopped with an error while you were elsewhere says so, with Carry on. If you left a conversation while its Bot worked and its run then failed (its model connection dropped, say), coming back on a slow connection showed the Bot's last line with no notice and no way on. It now shows the same notice and Carry on it showed when the run failed.

A person who left a conversation while its Bot worked, and came back after the
run failed, saw the Bot's last line with no notice and no Carry on: the kept
agent had heard the RUN_ERROR, but a failure was said again only from a join
that finished inside its 1.5 s deadline. Now a join that didn't finish asks the
server about the last run the kept agent heard, and says its failure again when
no run is going and that run didn't finish. The kept story's failure code goes
with it.

Browser test in Chromium and WebKit: red without the fix, green with it.
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit d24252b Dec 4, 2026
39 checks passed
@davidmckayv
davidmckayv deleted the fix/stopped-run-carry-on branch December 4, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant