mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #20474] Chat infinitely loads when history.currentId points to orphaned/deleted message #34723
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MacJedi42 on GitHub (Jan 7, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20474
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.43
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
Chrome 143
Confirmation
README.md.Expected Behavior
Selecting a chat in the sidebar should load the chat.
Actual Behavior
After deleting messages from a chat thread using the UI, the chat becomes inaccessible and displays an infinite loading state. The chat appears in the sidebar but never finishes loading when selected.
Steps to Reproduce
This may be difficult to reproduce as you may need to delete the right message to cause this issue to occur, you may need to know which message is the last message history.currentId is currently pointing to.
Logs & Screenshots
No errors were emitted in the docker log nor the browser console.
Additional Information
After investigating the SQLite database (webui.db), we identified the following inconsistency in the chat JSON structure:
The history.currentId field was pointing to a message ID (37a49f3b-xxxxx-yyyy-zzzz-aaaaaaaaaaaa) that had become orphaned and disconnected from the main conversation tree. This orphaned message had the following issues identified:
parentId: null
childrenIds: null
role: null
No connection to the main message chain
The UI deletion operation appears to have removed message content/links but left a stub in history.messages and also failed to update history.currentId to point to the new last valid message in the chain.
To find a orphaned chat ID I ran the following against the database:
SELECT id, title,
json_extract(chat, '$.history.currentId') as currentId
FROM chat
WHERE id = '<chat_id>';
Then check if the currentId exists in history.messages and has valid parentId/childrenIds linking it to the conversation tree
I manually resolved this myself by updating the history.currentId to point to the actual last message in the conversation chain and also removed the orphaned message from history.messages.
I have not provided logs as there was no error emitted in the docker container.
@owui-terminator[bot] commented on GitHub (Jan 7, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#18999 issue: Unable to load chat history
by i-iooi-i • Nov 07, 2025 •
bug#19225 issue: Chat history cannot be displayed and remains loading indefinitely
by ShirasawaSama • Nov 17, 2025 •
bug,help wanted#20414 issue: Chats can't be archived
by Ithanil • Jan 06, 2026 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.