[GH-ISSUE #20825] Chat becomes permanently stuck loading after cancelling a streaming response from suggested prompts #57966

Closed
opened 2026-05-05 22:03:33 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @bernadinm on GitHub (Jan 20, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20825

When using a suggested/pre-queued follow-up message and cancelling the response quickly while it's still streaming, the chat becomes permanently stuck in a loading state.

Steps to reproduce

  1. Open a chat with suggested follow-up prompts enabled
  2. Click one of the suggested prompts to send it
  3. While the assistant response is streaming, cancel it quickly
  4. The chat becomes stuck loading forever

Technical details

Cancellation creates a corrupted message in history.messages with:

  • role: "unknown" instead of "user" or "assistant"
  • No parentId (orphaned from the message tree)
  • No childrenIds

The history.currentId gets set to this orphaned message. The frontend can't render the chat because currentId points to an unlinked node in the message tree.

Expected behavior

Cancelling a streaming response should either properly link the partial message into the tree or roll back currentId to the previous valid message.

Environment

  • Open WebUI version: 0.7.2
  • Deployment: Docker (ghcr.io/open-webui/open-webui:main)
Originally created by @bernadinm on GitHub (Jan 20, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20825 When using a suggested/pre-queued follow-up message and cancelling the response quickly while it's still streaming, the chat becomes permanently stuck in a loading state. ## Steps to reproduce 1. Open a chat with suggested follow-up prompts enabled 2. Click one of the suggested prompts to send it 3. While the assistant response is streaming, cancel it quickly 4. The chat becomes stuck loading forever ## Technical details Cancellation creates a corrupted message in `history.messages` with: - `role: "unknown"` instead of "user" or "assistant" - No `parentId` (orphaned from the message tree) - No `childrenIds` The `history.currentId` gets set to this orphaned message. The frontend can't render the chat because `currentId` points to an unlinked node in the message tree. ## Expected behavior Cancelling a streaming response should either properly link the partial message into the tree or roll back `currentId` to the previous valid message. ## Environment - Open WebUI version: 0.7.2 - Deployment: Docker (ghcr.io/open-webui/open-webui:main)
Author
Owner

@silentoplayz commented on GitHub (Jan 21, 2026):

I am unable to reproduce. Also, please follow the provided PR checklist.

<!-- gh-comment-id:3777844350 --> @silentoplayz commented on GitHub (Jan 21, 2026): I am unable to reproduce. Also, please follow the provided PR checklist.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57966