You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Desktop] Renderer process locks up on session diff preview (diffLines in SessionReviewFilePreviewV2) #44415
The OpenCode desktop application renderer thread locks up and freezes/crashes when opening or rendering session review file diff previews (SessionReviewFilePreviewV2).
Because JS line diffing (diffLines) is executed synchronously within the main UI renderer process, processing large file diffs blocks the event loop, resulting in [error] (window) renderer unresponsive and crashing the application window.
Stack Trace / Debug Logs
Extracted from window.log when sampling the unresponsive renderer process:
[error] (window) renderer unresponsive samples
at execEditLength (oc://renderer/assets/main-DxX1DkV8.js:28907:7)
at LineDiff.diffWithOptionsObj (oc://renderer/assets/main-DxX1DkV8.js:28956:21)
at LineDiff.diff (oc://renderer/assets/main-DxX1DkV8.js:28877:17)
at diffLines (oc://renderer/assets/main-DxX1DkV8.js:29107:19)
at structuredPatch (oc://renderer/assets/main-DxX1DkV8.js:29149:35)
at createTwoFilesPatch (oc://renderer/assets/main-DxX1DkV8.js:29279:22)
at parseDiffFromFile (oc://renderer/assets/main-DxX1DkV8.js:29306:32)
at fileDiffFromContent (oc://renderer/assets/main-DxX1DkV8.js:135468:10)
at fileDiffFromPatch (oc://renderer/assets/main-DxX1DkV8.js:135402:28)
at resolveFileDiff (oc://renderer/assets/main-DxX1DkV8.js:135372:47)
at SessionReviewFilePreviewV2 (oc://renderer/assets/main-DxX1DkV8.js:148874:16)
Steps to Reproduce
Run a session in OpenCode that creates or modifies large files.
Open the Session Review tab / file diff preview (SessionReviewFilePreviewV2).
The renderer thread locks up synchronously in diffLines, causing Electron to register renderer unresponsive and hang/crash.
Proposed Fix / Enhancement
Offload diff generation (diffLines / createTwoFilesPatch) from the UI thread to a Web Worker or compute it server-side.
Add size/line limits to truncate diff generation for large files before passing to the UI.
Activity
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊