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 2.x: renderer OOM-crash on launch from workspace child-store hydration loop (legacy opencode.workspace.* scopes) #52736
Desktop 2.0.22 on macOS arm64 freezes ~16 s after the window appears, then the renderer OOM-crashes: app render process gone { reason: 'crashed', exitCode: 5 } at a 4.08 GB V8 heap. A memo over the
persisted workspace list creates one child store per workspace (child(worktree) → persist(...)),
and store creation invalidates that same memo, so it loops while allocating a new store, schema and
query observers each pass. The seed is 98 stale opencode.workspace.* scope rows in the profile's drafts.sqlite (vs 9 live worktrees); deleting them fixes it — 5/5 clean boots, flat 21 MB heap.
Beta on the same machine and data never hangs. Same loop as #51028 (Windows 2.0.15); this adds the
crash, the seed and the fix. Usernames/paths redacted.
Plugins
None configured.
OpenCode version
Desktop 2.0.22 (also reproduced on 2.0.16 and 2.0.18); Electron 44.4.5.
Steps to reproduce
Launch 2.0.22 with a desktop profile whose drafts.sqlite has accumulated opencode.workspace.*
state rows.
Wait ~20 s: renderer unresponsive in logs/<run>/window.log, then the renderer dies. Relaunching
does not help.
One scope row set (3 rows) is enough to reproduce; removing them all fixes it:
sqlite3 "$HOME/Library/Application Support/ai.opencode.desktop/drafts.sqlite" \
"DELETE FROM state WHERE name LIKE 'opencode.workspace.%'"
Key stack:
at Object.ME [as persist] (main-B6pJoE_b.js:21:59445)
at Object.b [as child] (…:682:6459)
at d (…:684:36898) <- l.child(e.worktree, { bootstrap: false })
at Proxy.map (<anonymous>)
at Object.fn (…:684:37163) <- createMemo(() => n.list().map(d))
Screenshot and/or share link
Unavailable — the renderer never becomes interactive, so /share can't run. Full bisection data and a
copy of the store are available on request.
Operating System
macOS on Apple silicon (Darwin 27.0.0, arm64)
Terminal
Unavailable — packaged Electron app launched from Finder, no TTY involved.
Please use the Bug Report template and provide its required Description field. The current body uses a custom “Summary” format and does not include the required field.
Please condense the exceptionally lengthy report into a focused description with the key reproduction details. The bug-report template warns against giant AI-generated summaries.
Please edit this issue to address the above within 72 hours, or it will be automatically closed.
This issue might be a duplicate of an existing issue. Please check:
#51028: Similar Desktop startup renderer freeze while creating per-project persisted stores, with a renderer store-creation loop.
If you believe this was flagged incorrectly, please let a maintainer know.
Thanks for updating the issue. It now uses the Bug Report fields and includes a concrete description, reproduction context, and system information. One item remains: the report is still exceptionally long, with extensive forensic measurements, tangential findings, and implementation suggestions. Please condense it to the core symptoms, a short reproduction path, and the most useful supporting evidence so the key report is easy to review.
Reproduced on Windows 11 (win32 x64, build 10.0.26200) with desktop 2.0.23 — same hydration loop, different platform and exit code than the macOS report.
The desktop app crashed repeatedly on launch — at worst every 10–20 seconds (18 log directories created between 10:08:06 and 10:17:47 on 2026-10-05 alone; 46 total crashes across 2026-09-28 → 2026-10-05, all with identical exit code). Every window.log in that period contains:
-1069547419 = 0xC0400065 — different from the macOS exitCode: 5 OOM code, but the reason: 'crashed' signature and the launch-time window match this issue. renderer.log shows the same ResizeObserver loop completed with undelivered notifications storm (hundreds per run) right up to the crash, plus [global-sdk] event stream disconnected afterwards. The main process and v2 CLI background service stayed healthy the whole time (v2 CLI background service ready in 1–2 s in every run).
Seed
%APPDATA%\ai.opencode.desktop\drafts.sqlite had 125 opencode.workspace.* state rows (vs ~7 live worktrees), including 7 rows with the base64 prefix QzpcVXNlcnNc (older profile path encoding) — i.e. the same stale-scope accumulation as in the report, just more of it.
Fix confirmed on this machine
Following the workaround from this issue:
sqlite3 "%APPDATA%\ai.opencode.desktop\drafts.sqlite" \
"DELETE FROM state WHERE name LIKE 'opencode.workspace.%'"
125 rows deleted, app relaunched: no crash, no ResizeObserver storm, no render process gone — the app has now survived 90+ seconds of active use where every previous run died within 30 seconds. Old opencode.workspace.* rows reappear only 3-per-launch in normal use; the crash loop correlates with the stale accumulation, and clearing it breaks the loop.
Happy to share the pre-fix drafts.sqlite backup if useful for reproducing the Windows variant.
Activity
github-actions commentedon Oct 2, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 72 hours, or it will be automatically closed.
This issue might be a duplicate of an existing issue. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Oct 2, 2026
Thanks for updating the issue. It now uses the Bug Report fields and includes a concrete description, reproduction context, and system information. One item remains: the report is still exceptionally long, with extensive forensic measurements, tangential findings, and implementation suggestions. Please condense it to the core symptoms, a short reproduction path, and the most useful supporting evidence so the key report is easy to review.
github-actions commentedon Oct 2, 2026
Thanks for updating the issue. The report now includes a clear description, reproduction steps, and system information.
adamczl commentedon Oct 5, 2026
Reproduced on Windows 11 (win32 x64, build 10.0.26200) with desktop 2.0.23 — same hydration loop, different platform and exit code than the macOS report.
Environment
latestchannel), bundled CLI 2.0.23, Electron 44.xSymptoms
The desktop app crashed repeatedly on launch — at worst every 10–20 seconds (18 log directories created between 10:08:06 and 10:17:47 on 2026-10-05 alone; 46 total crashes across 2026-09-28 → 2026-10-05, all with identical exit code). Every
window.login that period contains:-1069547419=0xC0400065— different from the macOSexitCode: 5OOM code, but thereason: 'crashed'signature and the launch-time window match this issue.renderer.logshows the sameResizeObserver loop completed with undelivered notificationsstorm (hundreds per run) right up to the crash, plus[global-sdk] event stream disconnectedafterwards. The main process and v2 CLI background service stayed healthy the whole time (v2 CLI background service readyin 1–2 s in every run).Seed
%APPDATA%\ai.opencode.desktop\drafts.sqlitehad 125opencode.workspace.*state rows (vs ~7 live worktrees), including 7 rows with the base64 prefixQzpcVXNlcnNc(older profile path encoding) — i.e. the same stale-scope accumulation as in the report, just more of it.Fix confirmed on this machine
Following the workaround from this issue:
125 rows deleted, app relaunched: no crash, no
ResizeObserverstorm, norender process gone— the app has now survived 90+ seconds of active use where every previous run died within 30 seconds. Oldopencode.workspace.*rows reappear only 3-per-launch in normal use; the crash loop correlates with the stale accumulation, and clearing it breaks the loop.Happy to share the pre-fix
drafts.sqlitebackup if useful for reproducing the Windows variant.