Repository navigation
A conversation opened on a slow connection says when its last run failed, with Carry on - #2933
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
December 4, 2026 11:47
…fter a slow reload A conversation opened on a slow link replays its runs past the join's 1.5 s deadline, so a reload never heard its last run fail and showed the Bot's last line with no notice and no Carry on. createConversationJoinToken now answers lastRun (the thread's most recent run, as getConversationRun says it; null when there is none, absent from an older server), as LangGraph's thread status and OpenAI's run status name a thread's last outcome. When the join didn't finish, the app reads it: a last run that failed is said in its own words where this page heard them, otherwise as a turn that stopped part way, with Carry on. A stopped, finished, waiting or refused turn says nothing, and an older server keeps the kept agent's own failure as before. Browser test in Chromium and WebKit: the slow reload is red without the app change and green with it.
davidmckayv
force-pushed
the
feat/conversation-last-run
branch
from
December 4, 2026 11:50
696fc2f to
e5da42d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Follow-up to #2931.
Found on OpenBot Cloud, 2026-12-04. A conversation whose Bot's run failed part way can open with nothing said about the failure: the Bot's last line, no notice and no Carry on. The run's error is not in the stored messages, only in the run's events. Opening the conversation replays those events, but only for 1.5 seconds before the app shows the stored history instead. On a slow link, a reload never reaches the error. #2931 fixed coming back to the conversation in the same page, where the app had heard the error itself. A reload has heard nothing, so only the server can say.
API (additive, read-only, optional).
createConversationJoinToken's answer gainslastRun. It is the thread's most recent run and how it ended, in the same shapegetConversationRunalready answers (ConversationRun: id, outcome, endedAt). It is null when the server keeps no run of the thread, and absent from a server from before it. Nothing is renamed or tightened, and an older app ignores it.oasdiffreports no breaking change.App. When the join that opens a conversation doesn't finish, the app reads
lastRunfrom the join token it already asks for. If the last run failed and no run is going, the app says so under the turn:It says nothing in these cases:
Against a server without
lastRun, #2931's behaviour stands. The same holds for every Bot, built-in or connected over AG-UI: it is read from the server's record of the run, not from anything of the Bot's.How the leaders do it
A thread's status names its last run's outcome:
GET /threads/{thread_id}hasstatus, one ofidle,busy,interruptedorerror, whereerrormeans the last run raised. Clients read it to tell a thread that failed from one that is idle. Sources: https://reference.langchain.com/python/langgraph-sdk/schema/ThreadStatus and https://langchain-ai.github.io/langgraph/cloud/how-tos/check_thread_statusGET /threads/{thread_id}/runs, and each run carriesstatus(failedamong them) andlast_error. Source: https://developers.openai.com/docs/api-reference/runs/objectlastRunfollows both. It is a run object with its id and outcome, like OpenAI's, read with the thread's handle, as LangGraph readsstatuswith the thread. It reuses OpenBot's existingConversationRunrather than adding a second status vocabulary.How the leaders show the failure itself is in #2931: Claude Code, ChatGPT and Cursor keep the work and show the error on the turn with one way on, also when you come back.
Tests
app/tests/stopped-turn-return-browser.test.tsxruns in a real browser against a real HTTP server standing in for the API and the runtime, in Chromium and WebKit, light and dark, at 390 and 1280 px.New in this PR:
app/tests/last-run-failure.test.tsholds the rules underneath, one answer each:Red/green, locally:
The notice and Carry on are the existing components, unchanged.
Changelog
API.
createConversationJoinTokenanswerslastRun: the thread's most recent run and how it ended (id,outcome,endedAt, asgetConversationRunsays it), or null when the server keeps none. A server from before this leaves it out.Web app and OpenBot Desktop.