2 min read

One blocking tool froze Open WebUI for everyone

A single async tool doing blocking work locked Kristen and me out of the whole site until the command finished. Plus four more Open WebUI lessons.

Open WebUI is the front end for every assistant in the house. One shared instance (v0.12.4) serves both me and Kristen, with a stack of custom tools. Most of what I know about it I learned from these breakages.

1. An async tool doing blocking work freezes the whole site

One of my tools was written as an async tool but did blocking work inside it. While it ran, the whole site froze for everyone. It once locked Kristen and me out until a command finished.

The rule: any async tool that does blocking work (SSH, requests, subprocess) has to push that work off the event loop:

result = await asyncio.to_thread(run_ssh_command, host, cmd)

Every tool I write now does this.

2. Run one worker

Two workers without Redis froze chat streams. One worker fixed it.

3. A “router” Function quietly answered everything

I built a vision router as a Function, to send image questions to a vision model. It quietly answered every request, and coding answers got worse. It needed to be a Tool that the model calls when it needs it.

4. Tools bleed across assistants

A tool attached to one assistant can show up in another assistant’s in-chat tool list. Worth knowing when you share one Open WebUI between people.

5. Runaway tokens

One chat reached 118K tokens because it re-sent its whole history on every message. First fix: history windows and message caps in my orchestrator. Then Open WebUI 0.12.4 added context compaction, which handles it properly.