Skip to content

[upstream #16609] Minimal resume submission breaks the error card when a reattached stream fails #223

Closed

Description

@berry-13

Found while testing resumeStream for LibreChat-AI#16609.

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 initialResponse isCreatedByUser: false (and a parent), and cover the error path in that spec.

Activity

  1. added
    bugSomething isn't working
    readyreviewctl followups state
    area: clientreviewctl followups state
    on Oct 1, 2026
  2. added
    in progressreviewctl followups state
    fixedreviewctl followups state
    and removed
    readyreviewctl followups state
    in progressreviewctl followups state
    on Oct 15, 2026
  3. berry-13 commented on Oct 15, 2026

    @berry-13
    OwnerAuthor

    Closed by reviewctl followups sync: LibreChat-AI#17112 merged on 2026-10-15 at 0354562.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clientreviewctl followups statebugSomething isn't workingfixedreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions