[GH-ISSUE #24089] issue: Code execution pyodide: Leaving conversation or tab during code exection results in endless processing without timeout #58846

Open
opened 2026-05-06 00:16:48 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @TomTheWise on GitHub (Apr 24, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24089

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

Docker

Open WebUI Version

0.9.2 dev latest (issue was already observed on 0.8.5 and 0.8.12)

Ollama Version (if applicable)

No response

Operating System

Debian13 podman

Browser (if applicable)

Chrome latest, Edge latest

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

When running a code execution prompt it should continue to work when switching to another conversation, and ideally the code execution should continue even when switching (buit not closing!) the tabs - jsut how the official pyodide test https://pyodide.org/en/stable/console.html works.
When coming back to the tab the code exection should be done.

Actual Behavior

See the Video

When sending a prompt with code execution (pyodide based) activated and then switching conversation within the same OWUI tab or switch to complete different browser tabs (same on both) before the thinking process and code execution / code interpretation is finished - it will never finish but OWUI will stuck in the circling / queuning. The code will never be run inside pyodide.
So its currently absolutlely neccessary to stay in the tab and in the conversation and wait for the AI to compeltely finish thinking, code executing and fully responding.

Steps to Reproduce

  1. Use a agentic Model that has native tool calling and code exectution enabled
  2. Send a prompt that will result in code execution.
  3. leave conversation within same OWUI tab (or leave browser tab completely)
  4. Come back 30 seconds later
  5. It will still - and indefinitely run code_execution
  6. pressing F5 after a few minutes will continue to show a circling for the chat just as if it is still qued / being processed - this never expires and is still after restarting the browser! (im worried that users can collect a LOT of still circling / qued / whatever unfinished chat conversations lead to bigger problems!)

Logs & Screenshots

https://github.com/user-attachments/assets/37f08b36-3ec4-4dd8-9567-ab5109ef75de

Additional Information

To be honest I don't really have deep insights how pyodide works on the deeper level within the browser. As it is run inside the browser tab - which is the security+ ease of use/maintenance charm of that - I can understand that MAYBE leaving the browser tab will kill the pyodide environment. HOWEVER: The official pyodide test (https://pyodide.org/en/stable/console.html) has sabsolutely no issues when leaving the tab and coming back. - It apparently runs as background worker in the Browser or something like that and survives tab changes without issues.

Alternatives considered:
If for Memory management or other reasons its not possible to keep pyodide running in the background, it would be nice if it would automatically be restarted after switchign back to the covnersation.
Anyway - OWUI at least should catch the error / timeout and show a warning message, because currently the chat ends up for ever circling - untill you stop the conversation manually - I am worried that it might also constatly does things (database / ram and so on) untill users manually stop the conversation. Multiple stuck circling conversations of users could lead to bigger problems down the line.

A few weeks ago I suspected this issue being related to #23181 - but as that was fixed in 9.x and the issue im describing can still be reproduced exactly, it is proably something else and purely related to how OWUI interacts with pyodide.

Originally created by @TomTheWise on GitHub (Apr 24, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24089 ### 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 Docker ### Open WebUI Version 0.9.2 dev latest (issue was already observed on 0.8.5 and 0.8.12) ### Ollama Version (if applicable) _No response_ ### Operating System Debian13 podman ### Browser (if applicable) Chrome latest, Edge latest ### 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 When running a code execution prompt it should continue to work when switching to another conversation, and ideally the code execution should continue even when switching (buit not closing!) the tabs - jsut how the official pyodide test https://pyodide.org/en/stable/console.html works. When coming back to the tab the code exection should be done. ### Actual Behavior See the Video When sending a prompt with code execution (pyodide based) activated and then switching conversation within the same OWUI tab or switch to complete different browser tabs (same on both) before the thinking process and code execution / code interpretation is finished - it will never finish but OWUI will stuck in the circling / queuning. The code will never be run inside pyodide. So its currently absolutlely neccessary to stay in the tab and in the conversation and wait for the AI to compeltely finish thinking, code executing and fully responding. ### Steps to Reproduce 1. Use a agentic Model that has native tool calling and code exectution enabled 2. Send a prompt that will result in code execution. 3. leave conversation within same OWUI tab (or leave browser tab completely) 4. Come back 30 seconds later 5. It will still - and indefinitely run code_execution 6. pressing F5 after a few minutes will continue to show a circling for the chat just as if it is still qued / being processed - this never expires and is still after restarting the browser! (im worried that users can collect a LOT of still circling / qued / whatever unfinished chat conversations lead to bigger problems!) ### Logs & Screenshots https://github.com/user-attachments/assets/37f08b36-3ec4-4dd8-9567-ab5109ef75de ### Additional Information To be honest I don't really have deep insights how pyodide works on the deeper level within the browser. As it is run inside the browser tab - which is the security+ ease of use/maintenance charm of that - I can understand that MAYBE leaving the browser tab will kill the pyodide environment. HOWEVER: The official pyodide test (https://pyodide.org/en/stable/console.html) has sabsolutely no issues when leaving the tab and coming back. - It apparently runs as background worker in the Browser or something like that and survives tab changes without issues. Alternatives considered: If for Memory management or other reasons its not possible to keep pyodide running in the background, it would be nice if it would automatically be restarted after switchign back to the covnersation. Anyway - OWUI at least should catch the error / timeout and show a warning message, because currently the chat ends up for ever circling - untill you stop the conversation manually - I am worried that it might also constatly does things (database / ram and so on) untill users manually stop the conversation. Multiple stuck circling conversations of users could lead to bigger problems down the line. A few weeks ago I suspected this issue being related to #23181 - but as that was fixed in 9.x and the issue im describing can still be reproduced exactly, it is proably something else and purely related to how OWUI interacts with pyodide.
GiteaMirror added the bug label 2026-05-06 00:16:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58846