Repository navigation
Renderer freezes / "app not responding" when computing large diffs #32046
Description
Description
Bug Report: Renderer freezes / "app not responding" when computing large diffs
Version: 1.17.4 (regression from 1.15.11)
OS: Windows (x64)
Elevated privileges: Yes (running as Administrator)
Description
After updating from v1.15.11 to v1.17.4, the app becomes unresponsive shortly after startup and shows the Electron "app is not responding" dialog. Relaunching does not help — the freeze occurs consistently.
Root Cause (from exported debug logs)
The renderer thread is blocking indefinitely inside execEditLength / LineDiff.diff when computing a file diff. The call stack from the unresponsive samples in window.log:
at execEditLength (main-whyaYE5k.js:42321)
at LineDiff.diffWithOptionsObj (main-whyaYE5k.js:42370)
at LineDiff.diff (main-whyaYE5k.js:42291)
at diffLines (main-whyaYE5k.js:42521)
at structuredPatch (main-whyaYE5k.js:42559)
at createTwoFilesPatch (main-whyaYE5k.js:42686)
at parseDiffFromFile (main-whyaYE5k.js:44313)
at fileDiffFromContent (session-Li0RE4sZ.js:6706)
at fileDiffFromPatch (session-Li0RE4sZ.js:6640)
at resolveFileDiff (session-Li0RE4sZ.js:6610)
The diff algorithm runs synchronously on the main renderer thread with no timeout or size guard. On large files this causes an O(n²) hang that never resolves, blocking the entire UI.
This appears to be a regression introduced in v1.17.4 — v1.15.11 did not exhibit this behavior, suggesting the diff rendering was made more eager/reactive in this release.
Aggravating factor
Running as Administrator gives OpenCode access to broader directories. The server initializes watchers for all previously opened workspaces simultaneously at startup, including a home directory (C:\Users\<user>). Any large file in those workspaces can trigger the diff computation immediately on load.
Steps to Reproduce
- Update from v1.15.11 to v1.17.4
- Have one or more large workspaces (or a home directory) registered as open locations
- Launch the app — renderer becomes unresponsive within ~30 seconds
- The "app is not responding" dialog appears; relaunching loops back to step 3
Expected Behavior
Diff computation should either:
- Run off the main thread (Web Worker / background process), or
- Have a file size threshold above which diff rendering is skipped or deferred, or
- Be lazy / on-demand rather than computed reactively on startup
Workaround
Removing large or broad workspaces (especially home directories) from the workspace list reduces the likelihood of triggering the freeze.
Logs
Debug log bundle exported via Export Logs from the unresponsive dialog. Key file: desktop/<timestamp>/window.log — contains 14 unresponsive samples all pointing to the diff call stack above.
Plugins
No response
OpenCode version
1.17.4
Steps to reproduce
No response
Screenshot and/or share link
opencode-debug-20260612T120657.zip
Operating System
No response
Terminal
No response
Activity
github-actions commentedon Jun 12, 2026
This issue might be a duplicate of existing issues. Please check:
execEditLengthcall stack, same regression pattern)If your issue is the same, please add a thumbs-up or comment on one of those threads rather than opening a new report so discussion stays consolidated.
PureKrome commentedon Jun 22, 2026
Can also confirm it occurs in 1.16.2.
I just updated to 1.16.2 -> 1.17.9 .. exact same issue as above ... uninstalled and then installed manually 1.16.2 ... opened app and same issue.
thimvanamersfoort commentedon Jul 7, 2026
Any update on this? Getting the same issue on Ubuntu 26.04, Opencode 1.17.14
github-actions commentedon Sep 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.