Skip to content

[Bug]: Plugin UI crashes the OpenCode desktop (Electron) renderer, headless engine is fine #579

Description

@Moore2877

Summary
On the OpenCode desktop app (Electron 42 / Chrome 148, v1.17.9, Windows 11),
DCP's UI surfaces reliably crash the renderer process. The pruning engine
itself is fine — disabling only the UI keeps full functionality with zero crashes.

Environment

  • DCP 3.1.13, installed --global
  • OpenCode desktop 1.17.9 (Electron renderer, not the terminal TUI)
  • Windows 11, local llama.cpp models, MCP-heavy config (puppeteer, etc.)

Symptoms

  • Renderer process crashes repeatedly (crashpad minidumps tagged renderer).
  • renderer.log floods with ResizeObserver loop completed with undelivered notifications — 1,000+ per session — in a tight burst right before each crash.
  • The node sidecar always exits cleanly (code: 0); backend logs show zero DCP
    errors
    , because the failure is render-side (DCP sends data fine; the renderer
    dies drawing it).

Isolation

  • pruneNotification: "off" + commands.enabled: falsecrashes stop.
  • Re-enabling only the on-demand /dcp panel (commands.enabled: true, notifications
    still off) → stable, compresses correctly.
  • Conclusion: the chat-injected prune notifications (pruneNotification: "detailed", injected into the scrolling chat list every prune) are the trigger.
    The engine (chat-transform hook) and /dcp panel are not.

Suspected cause
Notifications injected into the desktop's scrolling chat list on every prune drive
a ResizeObserver feedback loop in the Electron renderer's layout. The plugin was
designed for the terminal TUI, where this loop doesn't exist.

Possible fixes

  • Detect desktop vs TUI client and route prune feedback to toast instead of an
    injected chat message there.
  • Debounce/coalesce notification injection.
  • Document that desktop users should set pruneNotification: "off" or "toast".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions