You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[upstream #16609] Minimal resume submission breaks the error card when a reattached stream fails #223
When the stream status route answers a running job without resumeState, useResumeOnLoad builds a minimal resume submission whose initialResponse is { messageId: 'resume_', conversationId, text: '', content } with no isCreatedByUser (client/src/hooks/SSE/useResumeOnLoad.ts, the else branch that sets resumeStreamId). If the reattached stream then delivers a server-written error event, errorHandler builds the error turn from that initialResponse and tMessageSchema.parse throws a ZodError (isCreatedByUser required) in parseErrorResponse (client/src/hooks/SSE/useEventHandlers.ts). The error card is never written and the pane stays submitted.
Reproduce: in client/src/hooks/Chat/__tests__/transport.spec.tsx (resume block), answer the status read with { active: true, streamId, status: 'running', createdAt } and no resumeState, call resumeStream(), then emit { type: 'error', data: { message: 'x' } } on the reattached stream.
Current servers send resumeState for running jobs, so this needs an older server or a status without it. Fix: give the minimal initialResponseisCreatedByUser: false (and a parent), and cover the error path in that spec.
Activity
berry-13 commentedon Oct 15, 2026
Closed by reviewctl followups sync: LibreChat-AI#17112 merged on 2026-10-15 at 0354562.