Bug Description
New chat sessions in the Hermes Desktop app are completely frozen — blank chat area, can't type, can't send messages, no error shown. Existing (older) sessions continue to work fine. The issue is caused by the desktop's hermes serve backend restarting in an infinite loop.
Environment
- Hermes Agent: v0.18.2 (2026.7.7.2) · upstream 4281151
- OS: Windows 10 (Microsoft Windows Version 10.0.26200.8737)
- Python: 3.11.14
- Install method: git
- Custom provider: custom:naraya (mimo-v2.5-pro-hermes)
Symptoms
- Opening a new session shows a blank/frozen chat area
- Composer input is disabled — can't type or send
- No error message or overlay is shown
- Older sessions display and respond normally
- Gateway (
hermes gateway run) works fine independently (Telegram sessions work)
Key Evidence from Logs
gui.log — WebSocket connections keep dying and reconnecting
# 441 WebSocket reconnects logged
# 279 event loop stalls logged
# Pattern: connect → stall → disconnect → reconnect every 30-90 seconds
04:42:29 ws accepted → 04:43:03 ws closed (26 msgs, 34 sec!, code=1006)
04:44:50 ws accepted → 04:47:12 ws closed (86 msgs, 2 min, code=1006)
04:47:48 ws accepted → 04:49:09 ws closed (29 msgs, 90 sec!, code=1006)
Every WebSocket close triggers a full backend restart (visible as "Mounted plugin API routes" + "Desktop cron scheduler started" + new ws accepted cycle).
desktop.log — Infinite update loop
# 89 "Updating Hermes" triggers
# 51 backend restarts (HERMES_BACKEND_READY)
# 3 "Desktop boot failed" events
[hermes] [boot] Hermes backend is ready. Finalizing desktop startup
[hermes] [updates] restart: Updating Hermes — this window will close...
[hermes] Hermes backend exited (SIGTERM)
[hermes] [boot] An update is finishing — Hermes will start automatically...
[hermes] [boot] An update is finishing — Hermes will start automatically...
[hermes] [boot] An update is finishing — Hermes will start automatically...
# ...repeats endlessly
The .update_check file shows {"behind": 0, "ver": "0.18.2"} — the checkout IS up to date. git rev-parse HEAD and git rev-parse origin/main return the same SHA. Yet the desktop keeps triggering hermes-setup.exe --update --branch main.
gui.log — Event loop stalls (GIL pressure)
WARNING hermes_cli.web_server: event loop stalled 7.0s (GIL pressure suspected)
WARNING hermes_cli.web_server: event loop stalled 8.5s (GIL pressure suspected)
WARNING hermes_cli.web_server: event loop stalled 14.2s (GIL pressure suspected)
WARNING hermes_cli.web_server: event loop stalled 20.7s (GIL pressure suspected)
agent.log — Model fallback triggered during boot
run_agent: OpenAI client created (agent_init, shared=True) provider=custom model=mimo-v2.5-hermes
# (20 seconds later)
run_agent: OpenAI client created (agent_init, shared=True) provider=nous model=tencent/hy3:free
# (40 seconds later)
run_agent: OpenAI client created (switch_model, shared=True) provider=custom:naraya model=mimo-v2.5-pro-hermes
The desktop initially loads with mimo-v2.5-hermes (no -pro), fails, falls back to tencent/hy3:free, then eventually switches to the correct mimo-v2.5-pro-hermes. This suggests the desktop may be reading a stale model name.
desktop.log — Dashboard token 404
[hermes] [boot] could not read served dashboard token (Hermes backend): 404:
{"error":"Headless backend (hermes serve): web UI disabled — use `hermes dashboard` for the browser UI."}
This appears on every boot but the desktop falls back to the spawn token.
What Was Tried (didn't help)
- ✗ Cleared
.update_check and .update_exit_code — update loop persists
- ✗ Cleared Electron cache directories — issue persists
- ✗ Killed all Hermes processes and restarted — issue persists
- ✗ Confirmed
git rev-parse HEAD === git rev-parse origin/main — checkout is current
- ✗ Cleared
Local Storage, Session Storage, Cache, Code Cache, GPUCache, blob_storage, partition data — issue persists
- ✗ Gateway restart — issue persists
Hypothesis
The desktop's update detection (checkUpdates() in electron/main.ts) is triggering even though the checkout is up to date. The resolveBehindCount function at line ~2166 compares SHAs for the SSH remote path, but the origin is HTTPS. The non-SSH path (line ~2176) does git fetch + git rev-list --count which may return a stale or non-zero count due to shallow clone or detached state, causing behind > 0 even when current.
Each "update" triggers a full backend restart (hermes-setup.exe --update), which kills the running hermes serve process, drops all WebSocket connections, and makes the desktop reinitialize. During this gap, new sessions can't be created because the frontend's gateway connection is in a reconnecting state.
Additional Context
- 25 active cron jobs configured (may contribute to GIL pressure)
- Session context had grown to 151K+ tokens (may contribute to event loop stalls)
code=1006 WebSocket closures = abnormal closure (no close frame received)
detached_sessions=1-2 on each WebSocket close = sessions orphaned during reconnect
Logs Available
Full logs available at ~/AppData/Local/hermes/logs/:
desktop.log — 5.3MB
gui.log — 430KB
agent.log — 350KB
gateway.log — 750KB
errors.log — 450KB
Bug Description
New chat sessions in the Hermes Desktop app are completely frozen — blank chat area, can't type, can't send messages, no error shown. Existing (older) sessions continue to work fine. The issue is caused by the desktop's
hermes servebackend restarting in an infinite loop.Environment
Symptoms
hermes gateway run) works fine independently (Telegram sessions work)Key Evidence from Logs
gui.log— WebSocket connections keep dying and reconnectingEvery WebSocket close triggers a full backend restart (visible as "Mounted plugin API routes" + "Desktop cron scheduler started" + new
ws acceptedcycle).desktop.log— Infinite update loopThe
.update_checkfile shows{"behind": 0, "ver": "0.18.2"}— the checkout IS up to date.git rev-parse HEADandgit rev-parse origin/mainreturn the same SHA. Yet the desktop keeps triggeringhermes-setup.exe --update --branch main.gui.log— Event loop stalls (GIL pressure)agent.log— Model fallback triggered during bootThe desktop initially loads with
mimo-v2.5-hermes(no-pro), fails, falls back totencent/hy3:free, then eventually switches to the correctmimo-v2.5-pro-hermes. This suggests the desktop may be reading a stale model name.desktop.log— Dashboard token 404This appears on every boot but the desktop falls back to the spawn token.
What Was Tried (didn't help)
.update_checkand.update_exit_code— update loop persistsgit rev-parse HEAD === git rev-parse origin/main— checkout is currentLocal Storage,Session Storage,Cache,Code Cache,GPUCache,blob_storage, partition data — issue persistsHypothesis
The desktop's update detection (
checkUpdates()inelectron/main.ts) is triggering even though the checkout is up to date. TheresolveBehindCountfunction at line ~2166 compares SHAs for the SSH remote path, but the origin is HTTPS. The non-SSH path (line ~2176) doesgit fetch+git rev-list --countwhich may return a stale or non-zero count due to shallow clone or detached state, causingbehind > 0even when current.Each "update" triggers a full backend restart (
hermes-setup.exe --update), which kills the runninghermes serveprocess, drops all WebSocket connections, and makes the desktop reinitialize. During this gap, new sessions can't be created because the frontend's gateway connection is in a reconnecting state.Additional Context
code=1006WebSocket closures = abnormal closure (no close frame received)detached_sessions=1-2on each WebSocket close = sessions orphaned during reconnectLogs Available
Full logs available at
~/AppData/Local/hermes/logs/:desktop.log— 5.3MBgui.log— 430KBagent.log— 350KBgateway.log— 750KBerrors.log— 450KB