Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(conversations): handle missing conversation data gracefully

Steven Enamakelf21dc2830dd6
diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsx
index 5c350db81c..91baa5990f 100644
--- a/app/src/features/conversations/Conversations.tsx
+++ b/app/src/features/conversations/Conversations.tsx
@@ -1380,7 +1380,16 @@ const Conversations = ({
addInferenceResponse({
content: partial,
threadId,
- extraMetadata: { stopped: true, ...(requestId ? { requestId } : {}) },
+ // `cancelReason: 'user_stop'` is what the vendored `StoppedRun`
+ // element's reason chip reads (`thread.tsx`'s `StoppedRunSlot`);
+ // this is the user-initiated Stop path, as opposed to the core
+ // superseding the turn (`chat_cancelled{cancel_reason:
+ // "superseded"}`, handled in `ChatRuntimeProvider`).
+ extraMetadata: {
+ stopped: true,
+ cancelReason: 'user_stop',
+ ...(requestId ? { requestId } : {}),
+ },
})
).then(() => debug('[chat] stop generation: persisted stopped reply thread=%s', threadId));
}