anomalyco / anomalyco/opencode
[Desktop] UI freezes after agent turns finish — renderer stuck in ResizeObserver loop; only force-quit + relaunch recovers
@Hona is already working on this.
Since Aug 19, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The OpenCode Desktop app (Electron, v1.18.18) freezes: the window becomes completely unresponsive (no click/typing reaction, no rendering updates) shortly after an assistant turn finishes. The backend core loop is still alive — it finishes turns and logs normally — only the renderer UI is stuck. The only way to recover is force-quitting and relaunching the app.
Happened twice within ~20 minutes (18:22–18:29 and 18:37–18:40 local time), each time ending with a forced app restart. The renderer log around both freezes is flooded with ResizeObserver loop completed with undelivered notifications, and the same errors keep occurring continuously even during normal operation (634 occurrences in the current session within 3.5 hours), so the layout loop is an ongoing condition that periodically escalates into a full freeze.
Timeline (local time):
- 18:21:55 – agent turn # 1 completes (exiting loop in core log); renderer floods with ResizeObserver errors; window freezes for ~7 min.
- 18:29:05 – force-quit and relaunch (main.log: new app start).
- 18:31:41 – agent turn # 2 completes; renderer floods again (18:31:38–18:35:31).
- 18:36:53 – agent turn # 3 completes; window freezes again.
- 18:40:10 – force-quit and relaunch again. Freezes stop only after restart.
Plugins
No response
OpenCode version
Desktop app 1.18.18 (auto-updater reports this as latest).
Steps to reproduce
Not 100% reproducible, but the pattern observed:
- Open a large project folder (in my case a ~5 GB directory tree with ~2,400 files inside a Nutstore-synced folder on Windows 10).
- Send a message and let the assistant turn complete.
- Within seconds after the turn finishes, the window freezes for 3–7 minutes; input and rendering stop. The agent's own turn history keeps being written to the core log during the freeze, so only the UI is affected.
- Force-quit and relaunch the app — the session then resumes normally.
Trigger seems related to rendering completed assistant messages, possibly aggravated by a very large project tree / long messages.
Additional context
Some observations from my logs that may help diagnose:
-
Root-cause hypothesis (renderer layout loop): The freezes start exactly when a completed assistant message is rendered into the chat. DOM size oscillation (auto-resizing scroll container / streaming content) keeps invalidating layout faster than Chromium can deliver ResizeObserver notifications, starving the renderer's main thread. The main process stays alive and responsive (auto-update checks keep firing during the freezes); only the renderer is stuck, and a full app restart is the only recovery. The errors also appear continuously during normal operation (hundreds per session), so the layout loop is persistent and periodically escalates into a complete freeze.
-
Possible aggravating factors:
- The project is a ~5.3 GB directory tree (~2,400 files) inside a Nutstore (坚果云 / Jianguoyun) sync folder on Windows. The sync driver adds I/O latency and file locks; a large tree makes every file-tree refresh and message render slower.
- Earlier today the same app instance logged a burst of
ENOENTerrors: the file API repeatedly attemptedFileSystem.liston a project path that no longer exists (the folder name appeared duplicated, e.g....\Project xxx\Project xxx, lstat -> ENOENT). This suggests stale/mismatched workspace paths are stored in the desktop app state, which can trigger repeated tree refreshes and extra renderer work.
Screenshot and/or share link
No share link available (local session). Attached: full renderer logs of the two most recent app sessions (also referenced as attachments).
-
Renderer log — session 20260818T102905 (contains both freezes; app launched 18:29:05, killed 18:40:10). Path: %APPDATA%\ai.opencode.desktop\logs\20260818T102905\renderer.log
-
Renderer log — session 20260818T104010 (post-restart session, current; errors continue constantly). Path: %APPDATA%\ai.opencode.desktop\logs\20260818T104010\renderer.log
20260818T104010.txt
20260818T102905.txt
Operating System
Windows 10 22H2 (build 19045)
Terminal
N/A — OpenCode Desktop app (GUI, Electron)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.