[GH-ISSUE #23179] issue: Sending a message and quickly switching conversations causes chat corruption — message is overwritten onto the wrong conversation #35439

Closed
opened 2026-04-25 09:38:58 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @ShirasawaSama on GitHub (Mar 28, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23179

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.8.12

Ollama Version (if applicable)

No response

Operating System

Mac

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

  • The send operation should be bound to the original conversation's ID at the moment of submission and should not be affected by subsequent navigation.
  • If the user switches conversations while a message is still being sent, the operation should either:
    • Continue in the background and correctly persist to the original conversation, or
    • Be cancelled gracefully with the message preserved (e.g., saved as a draft in the original conversation).
  • Under no circumstances should switching conversations cause another chat's history to be overwritten or corrupted.

Actual Behavior

The send request is initiated with Chat A's ID, but due to the rapid conversation switch, the frontend context updates to Chat B. The subsequent API calls (placeholder message creation, /completions streaming, chat history updates) now operate against Chat B's state, causing the message to be forcefully overwritten onto Chat B. Chat A's sent message is lost, and Chat B's history is corrupted.

Steps to Reproduce

  1. Open a conversation (Chat A) and type a message in the input box.
  2. Press Enter to send the message.
  3. Immediately click on another conversation (Chat B) in the sidebar before the API call completes.
  4. Observe that:
    • Chat A does not contain the message you just sent.
    • Chat B's history is corrupted — the sent message and/or the LLM response appear in Chat B, or Chat B's original messages are overwritten.

Logs & Screenshots

@Classic298

Additional Information

Fixes #19225

Fix pull request: #22146

Originally created by @ShirasawaSama on GitHub (Mar 28, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23179 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.8.12 ### Ollama Version (if applicable) _No response_ ### Operating System Mac ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior - The send operation should be **bound to the original conversation's ID** at the moment of submission and should not be affected by subsequent navigation. - If the user switches conversations while a message is still being sent, the operation should either: - **Continue in the background** and correctly persist to the original conversation, or - **Be cancelled gracefully** with the message preserved (e.g., saved as a draft in the original conversation). - Under no circumstances should switching conversations cause another chat's history to be overwritten or corrupted. ### Actual Behavior The send request is initiated with Chat A's ID, but due to the rapid conversation switch, the frontend context updates to Chat B. The subsequent API calls (placeholder message creation, `/completions` streaming, chat history updates) now operate against Chat B's state, causing the message to be forcefully overwritten onto Chat B. Chat A's sent message is lost, and Chat B's history is corrupted. ### Steps to Reproduce 1. Open a conversation (Chat A) and type a message in the input box. 2. Press `Enter` to send the message. 3. **Immediately** click on another conversation (Chat B) in the sidebar before the API call completes. 4. Observe that: - Chat A does not contain the message you just sent. - Chat B's history is corrupted — the sent message and/or the LLM response appear in Chat B, or Chat B's original messages are overwritten. ### Logs & Screenshots @Classic298 ### Additional Information Fixes #19225 Fix pull request: #22146
GiteaMirror added the bugconfirmedconfirmed issue labels 2026-04-25 09:38:58 -05:00
Author
Owner

@Classic298 commented on GitHub (Mar 28, 2026):

Can reproduce here.

When sending a message and INSTANTLY switching to another chat, it will CORRUPT and BREAK the chat you switch to

The chat switching TO is then completely broken, it will load and load and never finish loading. Exporting and importing the chat also doesnt work. The chat itself becomes broken.

And sometimes the chat you switch FROM also becomes broken by doing this

<!-- gh-comment-id:4148321744 --> @Classic298 commented on GitHub (Mar 28, 2026): Can reproduce here. When sending a message and INSTANTLY switching to another chat, it will CORRUPT and BREAK the chat you switch to The chat switching TO is then completely broken, it will load and load and never finish loading. Exporting and importing the chat also doesnt work. The chat itself becomes broken. And sometimes the chat you switch FROM also becomes broken by doing this
Author
Owner

@tjbck commented on GitHub (Apr 13, 2026):

Should be addressed in dev.

<!-- gh-comment-id:4239159692 --> @tjbck commented on GitHub (Apr 13, 2026): Should be addressed in dev.
Author
Owner

@AIWintermuteAI commented on GitHub (Apr 20, 2026):

@tjbck I believe I currently experience this issue. Can you let us know the commit/version tag where this was fixed?

<!-- gh-comment-id:4283733081 --> @AIWintermuteAI commented on GitHub (Apr 20, 2026): @tjbck I believe I currently experience this issue. Can you let us know the commit/version tag where this was fixed?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35439