Repository navigation
Say how a Bot's run in a conversation ended - #2239
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 26, 2026 02:25
getConversationRun answers how one run ended, as its own last event said: succeeded, interrupted, cancelled or failed, or null while it is going or when it ended without saying how. A client that stopped hearing a run before its end (a phone that slept, a socket that dropped) asks it once the conversation has no run going, so a run that finished is shown as finished rather than as one that stopped part way. Additive: a new operation, its response and its 404.
davidmckayv
force-pushed
the
api/conversation-run-outcome
branch
from
November 26, 2026 02:48
bcf7be9 to
0949543
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
A new operation,
getConversationRun:GET /api/v2/organizations/{organizationId}/conversations/{conversationId}/runs/{runId}. It says how one of a Bot's runs in a conversation ended, as the run's own last event said:succeeded,interrupted,cancelledorfailed(an open enum), ornullwhile the run is going or when it ended without saying how. A run the server keeps no record of in that conversation is a 404 (CONVERSATION_RUN_NOT_FOUND).Why
When the app stops hearing a run before its end (a phone that slept during a long answer, a socket that dropped), it asks whether the conversation still has a run going. "No run going" did not say whether the run finished or stopped part way, so a run that finished was shown with "The Bot stopped before it finished" and Carry on. With this the app can tell the two apart and show a finished turn as finished.
Checks
bun run api:lintpasses.bun test apipasses.The app change that uses it is #2240.