Skip to content

Possible Bug: Renderer OOM crash loop after updating to v1.17.18 #36218

Closed as not planned

Description

@MrNova420

Description

ive been having issues after updating.

After updating from v1.17.15 to v1.17.18, the desktop app enters a crash loop. The renderer process consistently crashes with Out of Memory (exit code -536870904, reason oom) within 30–60 seconds of startup.

Crash Pattern (from window.log)

{ reason: 'oom', exitCode: -536870904 }

The crash always happens in the SolidJS reactive rendering chain:

constructMessageRows (main-DkZ489eH.js:144992)
→ createTimelineProjection (main-DkZ489eH.js:145135)
→ MessageTimeline (main-DkZ489eH.js:145462)
→ loadMessages / applyMessagePage (main-DkZ489eH.js:74606)

The unresponsive samples show recursive lookUpstream calls (6+ levels deep) in the SolidJS dependency graph, suggesting the reactive memos are not being properly disposed when new message pages are applied.

System Info

  • OpenCode Desktop v1.17.18
  • Electron 42.3.3 / Chrome 148.0.7778.218
  • Windows 11 64-bit
  • Crashpad minidumps available on request

Debug Logs

Debug archive generated at the time of crash (contains main.log, renderer.log, window.log, crashpad dumps, and server logs, 28MB total). I can provide on request or upload to a gist.

Likely Root Cause

The qO/fKe reconciliation functions in createTimelineProjection create new AssistantPart wrapper objects on every applyMessagePage call, even when nothing semantically changed. These accumulate in SolidJS memos without proper cleanup, causing the reactive dependency graph to grow unboundedly until OOM.

Steps Taken

  • App restarts automatically but re-crashes immediately
  • Clearing cache / conversation history temporarily helps but issue returns

Possible Fix

  • Fix qO to reuse existing objects when unchanged instead of creating new wrappers
  • Add proper disposal of old timeline rows when new pages are loaded
  • Virtualize the MessageTimeline to avoid holding all rows in reactive memory

Plugins

No response

OpenCode version

v1.17.18

Steps to reproduce

  1. Install OpenCode Desktop v1.17.18 on Windows 11 x64
  2. Launch the app (it loads previous conversation history)
  3. Renderer becomes unresponsive → crashes → auto-restarts → crashes again
    but ofc it only happening cuz of long session history so would need to also reproduce that.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jul 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from those (e.g. specific to v1.17.18 or a regression from v1.17.15), please add a note clarifying the difference.

  2. MrNova420 commented on Jul 10, 2026

    @MrNova420
    Author

    it is similar to #32005 ...but that issue was reasled a month ago and still has issues, so still needs handled.

  3. d34DMK1 commented on Jul 11, 2026

    @d34DMK1

    Confirming this on a second independent report (I filed #36379 before the bot flagged it as a duplicate of this one - closing mine in favor of this). Same version (v1.17.18), same Windows 11, same exact stack trace.

    A few data points that might help narrow down the root cause, since they weren't in the original report:

    • Message count: the affected session had ~2,956 raw rows in the message table at time of first freeze, growing to ~3,164 after some interaction. The next-largest session anywhere else in the same local install (many other projects/sessions) was 647 - roughly 4-5x smaller. So this does seem to scale with raw message count specifically, not just general session age.
    • /compact does NOT fix it. Ran /compact via the CLI/TUI on the affected session (which worked fine there - see below). The raw row count in the message table was unaffected by compaction (it stayed just as large / grew slightly from the compact operation's own messages), and reopening the session in the desktop app still hung afterward. This is consistent with your theory (Possible Bug: Renderer OOM crash loop after updating to v1.17.18 #36218) that the issue is unbounded SolidJS reactive memo growth over the full raw message set, since compaction only affects what's sent to the model as context, not the raw row count the renderer has to process.
    • The TUI opens the same session without hanging - it appears to hardcode a ~100 message load limit ([BUG] Cannot scroll to beginning of long conversations (message limit hardcoded to 100) (#6138) #6137), which may be why it dodges this entirely. Might be a useful reference point for a workaround/mitigation (cap the desktop timeline's initial load similarly) while the underlying reactive-disposal bug is fixed.
    • Not a database corruption issue - ran PRAGMA quick_check on the SQLite DB directly, returned ok. Pure rendering-side issue.

    Workaround that's worked for us in the meantime: access the affected session via CLI (opencode -s <session-id>) instead of the desktop app.

  4. Alex-Blanes commented on Jul 19, 2026

    @Alex-Blanes

    Same issue here - v1.18.3 Windows x64

    Same crash since updating to v1.18.3. Renderer OOM within 30-85 seconds of startup.

    Stack trace (identical to reported):
    \
    constructMessageRows → createTimelineProjection → MessageTimeline → loadMessages → applyMessagePage
    \\

    System: Windows 11 x64, 16GB RAM, OpenCode Desktop v1.18.3 packaged

    What I tried that didn't help:

    • Cleared Cache + Crashpad directories
    • Deleted 4 largest sessions from the database (removed ~45% of events)
    • Ran VACUUM on the database
    • Set OPENCODE_AUTO_HEAP_SNAPSHOT=1 (no snapshot was generated)

    RAM trace during crash:
    After session cleanup, the desktop app still consumed ~5.7 GB of RAM in 85 seconds before dying:

    Time Total WS Processes Note
    T+0s 1.2 GB baseline App opens
    T+15s 2.7 GB 24 procs Growing
    T+45s 4.5 GB 24 procs
    T+75s 5.5 GB 24 procs
    T+85s 5.7 GB 24 procs Last reading before OOM

    Memory was growing at ~67 MB/s. The \event\ table in the database still has 11,806 rows (173 MB) across 28 sessions — the renderer creates SolidJS reactive wrappers for all of them.

    The database is stored at ~/.local/share/opencode/opencode.db\ (not in the userData dir mentioned in the manifest).

    Let me know if you need any specific debug info. I can provide sanitized logs (without local paths) if helpful.

  5. github-actions commented on Sep 19, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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