mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #24089] issue: Code execution pyodide: Leaving conversation or tab during code exection results in endless processing without timeout #35708
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 @TomTheWise on GitHub (Apr 24, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24089
Check Existing Issues
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
README.md.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
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.