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
[Bug]: Desktop renderer crashes from ResizeObserver feedback loop on rapid chat-list updates #33712
Summary
The desktop (Electron) renderer enters a ResizeObserver feedback loop when the chat
message list updates rapidly, flooding renderer.log with thousands of ResizeObserver loop completed with undelivered notifications and eventually
crashing the renderer process.
Environment
OpenCode desktop 1.17.9, Electron 42.3.3 / Chrome 148, Windows 11
Evidence
renderer.log: 1,000+ ResizeObserver loop... errors/session, bursting before each crash.
Triggered/amplified by a plugin (DCP) injecting notifications into the chat list
every turn — but the underlying loop is in the desktop's own layout/resize handling.
Suggestion
Guard the chat-list ResizeObserver against feedback loops (rAF-defer or
size-delta threshold) so high-frequency message updates can't spiral into a
renderer crash.
Plugins
opencode-dynamic-context-pruning
OpenCode version
OpenCode desktop 1.17.9
Steps to reproduce
Install the plugin
Run through some context and then trigger a compress
TL;DR: 3,840 out of 4,030 renderer.log lines are ResizeObserver errors (95.3%). Three crash dumps collected within 24 hours. The feedback loop is triggered by dock/composer resizing, no plugin needed.
The cascade originates from three co-located createResizeObserver calls that fire simultaneously when the composer dock resizes:
packages/app/src/pages/session/composer/session-composer-region-controller.ts:99 — calls getBoundingClientRect() in every observer callback, zero throttling
packages/app/src/pages/session.tsx:1171 — fires scheduleScrollState() + fill() on content area resize
packages/app/src/pages/session.tsx:1509 — fires scrollToEnd() + scheduleScrollState() + fill() on prompt dock height change
The feedback chain: dock resize → #1 fires → re-layout → #2 fires → content resize → #3 fires → more layout → back to #1. All within a single animation frame.
Peak burst: 20+ errors/second, sustained for ~30 seconds producing ~200 errors in one burst. Under load this freezes the renderer → Electron watchdog kills it → crash dump.
renderer.log: 53 ResizeObserver loop completed with undelivered notifications lines in 344 s.
Peak burst: 16 errors in any 5 s window (avg 6.6 s between errors).
main.log clean: sidecar ready in 2.4 s, no errors.
crash.log and Crashpad empty — the renderer hangs, it does not crash.
6–7 OpenCode.exe processes accumulate, the main process is ~320 MB RSS.
UI freezes on the "Thinking" indicator after a few minutes. Kill all OpenCode.exe + restart re-enables input.
🆕 New signal not in the original report
The original report scoped this to the v2 composer dock. I am on the old layout (oldLayoutEligible: true confirmed in opencode.settings), and I still see the same ResizeObserver flood plus the same UI freeze. This suggests the bug also exists in the legacy session page, not only in the new v2 composer. If your fix only touches the three createResizeObserver calls in the v2 composer, please also check whether the same or similar observer cluster exists in the legacy packages/app/src/pages/session_legacy/ (or whatever the v1 code path is called).
What I see in the wild that you might not see in your repro
The UI does not always show a "Thinking" indicator during the freeze. Sometimes the input box becomes completely unresponsive — I cannot click the send button, the model dropdown doesn't open, nothing. Other times the "Thinking" indicator is rendered but the model is not actually producing tokens (and re-sending the same message after restart shows the previous one was never sent at all — it was lost on freeze).
The freeze is intermittent: I can send 2–3 messages successfully, then the next one hangs. Not every message is affected.
This pattern is independent of model, session, or workspace. Repro: send image attachments + a multi-paragraph prompt.
Temporary workaround I'm using
When frozen: taskkill /F /IM OpenCode.exe, then restart. Re-send the lost message.
Lock window size after launch; do not resize (avoids triggering the observer chain).
Send a short "priming" message (e.g. a single character) within ~5 s of UI ready to anchor the layout before observers fire.
Data
Diagnostic backup: opencode-diagnostic-2026-07-20-233222 (settings, global.dat, draft, user opencode.json, window-state)
Confirmed on OpenCode Desktop 1.18.4 for Windows without configured plugins or MCP servers.
My local renderer logs contain 3,535 occurrences of ResizeObserver loop completed with undelivered notifications across 13 launches. The UI becomes completely unresponsive while the sidecar remains healthy and the task may continue running.
This confirms that the feedback loop is not dependent on the plugin mentioned in the original report.
Full anonymized evidence and environment details: #37997 (comment)
Activity
RockingSisyphus commentedon Jun 26, 2026
I'm seeing the same issue on Linux (v1.17.11, Electron 42.3.3), so this is cross-platform.
Full evidence gist: https://gist.github.com/RockingSisyphus/53ceef8127c47871d5b0493be9842450
TL;DR: 3,840 out of 4,030 renderer.log lines are ResizeObserver errors (95.3%). Three crash dumps collected within 24 hours. The feedback loop is triggered by dock/composer resizing, no plugin needed.
The cascade originates from three co-located
createResizeObservercalls that fire simultaneously when the composer dock resizes:packages/app/src/pages/session/composer/session-composer-region-controller.ts:99— callsgetBoundingClientRect()in every observer callback, zero throttlingpackages/app/src/pages/session.tsx:1171— firesscheduleScrollState()+fill()on content area resizepackages/app/src/pages/session.tsx:1509— firesscrollToEnd()+scheduleScrollState()+fill()on prompt dock height changeThe feedback chain: dock resize → #1 fires → re-layout → #2 fires → content resize → #3 fires → more layout → back to #1. All within a single animation frame.
Peak burst: 20+ errors/second, sustained for ~30 seconds producing ~200 errors in one burst. Under load this freezes the renderer → Electron watchdog kills it → crash dump.
Crashpad pending dumps: 235 KB, 260 KB, 421 KB (Jun 26-27).
IvoDimitrovPro commentedon Jul 20, 2026
Update from real-world Windows 11 session — 2026-07-20
Context: Reconfirming this bug is still present in v1.18.4 (latest, installed today). One new signal below that wasn't in the original report.
Environment
oldLayoutEligible: true) — see "new signal" belowplugin: [](empty, ruled out)Reproduction confirmed (this run, 2026-07-20 23:32 UTC)
C:\Users\ivo\AppData\Roaming\ai.opencode.desktop\logs\20260720T203241\renderer.log: 53ResizeObserver loop completed with undelivered notificationslines in 344 s.main.logclean: sidecar ready in 2.4 s, no errors.crash.logand Crashpad empty — the renderer hangs, it does not crash.OpenCode.exeprocesses accumulate, the main process is ~320 MB RSS.OpenCode.exe+ restart re-enables input.🆕 New signal not in the original report
The original report scoped this to the v2 composer dock. I am on the old layout (
oldLayoutEligible: trueconfirmed inopencode.settings), and I still see the sameResizeObserverflood plus the same UI freeze. This suggests the bug also exists in the legacy session page, not only in the new v2 composer. If your fix only touches the threecreateResizeObservercalls in the v2 composer, please also check whether the same or similar observer cluster exists in the legacypackages/app/src/pages/session_legacy/(or whatever the v1 code path is called).What I see in the wild that you might not see in your repro
Temporary workaround I'm using
taskkill /F /IM OpenCode.exe, then restart. Re-send the lost message.Data
opencode-diagnostic-2026-07-20-233222(settings, global.dat, draft, user opencode.json, window-state)renderer.logSHA-256:78f063d3708ac5783e6237f1d315ec992d4a602232b13cd62f14bb20bb03a866Thanks for picking this up — happy to provide more logs or run any test build you want.
rafaelbn commentedon Jul 23, 2026
Confirmed on OpenCode Desktop 1.18.4 for Windows without configured plugins or MCP servers.
My local renderer logs contain 3,535 occurrences of
ResizeObserver loop completed with undelivered notificationsacross 13 launches. The UI becomes completely unresponsive while the sidecar remains healthy and the task may continue running.This confirms that the feedback loop is not dependent on the plugin mentioned in the original report.
Full anonymized evidence and environment details:
#37997 (comment)
github-actions commentedon Sep 22, 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.