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 sidecar crashes with Bun panic "integer does not fit in destination type" after ~60s, RSS 22-25GB #23443
OpenCode Desktop (v1.14.18) on Windows 11 crashes the sidecar (opencode-cli.exe / Bun v1.3.11) approximately 60 seconds after launch with:
panic(thread XXXXX): integer does not fit in destination type
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
RSS: 21.99GB | Peak: 21.99GB | Commit: 22.85GB | Machine: 68.64GB
The sidecar memory usage grows from ~0 to 22-25 GB RSS in ~60 seconds before the crash. The crash report URL is: https://bun.report/1.3.11/ea1af24e28moGuhooC6gngQs347Myw16Jg3rgNCYKERNEL32.DLLut0LCSntdll.dll4/hjBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxYYrWApkTHbkEZWRd/gBNAAPKQ
This matches the known Bun Windows issue fixed in PR #29327 (merged Apr 15, 2026) where uv_fs_read return values were truncated from ssize_t to int.
The crash reproduces consistently. Sample from opencode-desktop_2026-04-19_13-40-07.log:
2026-04-19T19:40:09.465853Z INFO opencode_lib: Loading done, completing initialisation
2026-04-19T19:40:12.022557Z INFO sidecar: ERROR service=mcp clientName=github error=MCP error -32601: Method not found failed to get prompts
[... skill duplicate warnings ...]
2026-04-19T19:41:11.744061Z INFO sidecar: Bun v1.3.11 (af24e281) Windows x64 (baseline)
2026-04-19T19:41:11.745046Z INFO sidecar: Elapsed: 63880ms | User: 15437ms | Sys: 11078ms
2026-04-19T19:41:11.745143Z INFO sidecar: RSS: 21.99GB | Peak: 21.99GB | Commit: 22.85GB
2026-04-19T19:41:11.745156Z INFO sidecar: panic(thread 19228): integer does not fit in destination type
2026-04-19T19:41:11.745173Z INFO sidecar: oh no: Bun has crashed.
The sidecar restarts automatically but crashes again within ~60 seconds, creating 20+ crash logs per day.
Steps to reproduce
Open OpenCode Desktop on Windows 11
Wait ~60 seconds
Sidecar crashes with panic
Additional context
I've set OPENCODE_AUTO_HEAP_SNAPSHOT=1 to capture heap snapshots for diagnosis
Removed duplicate skill configurations that were generating warnings
The MCP server error (Method not found for prompts) is a separate non-fatal issue
This issue might be a duplicate of existing issues. Please check:
Memory Megathread #20695: Memory Megathread — the team is actively collecting heap snapshots to track memory issues. Since you already have OPENCODE_AUTO_HEAP_SNAPSHOT=1 set, please consider uploading your .heapsnapshot files as described there.
Same crash confirmed — additional evidence (Windows 11, v1.14.18, Bun v1.3.11)
Experiencing the exact same crash with identical symptoms. Adding my evidence to help with diagnosis.
Environment
OpenCode Desktop: v1.14.18
Bun: v1.3.11 (bundled sidecar opencode-cli.exe)
OS: Windows 11 Home 26200
RAM: 32 GB
CPU: AMD Ryzen 9
Observed behavior
The sidecar crashes with the same panic: integer does not fit in destination type after memory grows to ~15-25 GB RSS. Multiple independent triggers observed:
Trigger 1: Startup — no user action needed
Simply launching OpenCode Desktop causes Bun memory to spike from ~600 MB to 15+ GB within 60 seconds, then crash. This reproduces consistently.
Trigger 2: /compact command
Running /compact on a session with 264 messages (2.0 MB content) causes memory to grow from 635 MB to 15+ GB in ~86 seconds, then crash with:
RSS: 11.84GB | Peak: 19.81GB | Commit: 28.04GB | Faults: 16,540,592
panic(thread 48480): integer does not fit in destination type
Sidecar terminated code=Some(3) signal=None
Trigger 3: Stale git index.lock in snapshot directory
A zero-byte stale index.lock in ~/.local/share/opencode/snapshot/<hash>/ caused the snapshot service to enter a retry storm, generating 845 index.lock errors and spawning 136 orphaned git child processes. This drove opencode-cli.exe to 11,203 handles / 5.3 GB working set before crash (normal: ~335 handles / 635 MB).
Activity
github-actions commentedon Apr 19, 2026
This issue might be a duplicate of existing issues. Please check:
OPENCODE_AUTO_HEAP_SNAPSHOT=1set, please consider uploading your.heapsnapshotfiles as described there.DrDexter6000 commentedon Apr 20, 2026
Same crash confirmed — additional evidence (Windows 11, v1.14.18, Bun v1.3.11)
Experiencing the exact same crash with identical symptoms. Adding my evidence to help with diagnosis.
Environment
opencode-cli.exe)Observed behavior
The sidecar crashes with the same
panic: integer does not fit in destination typeafter memory grows to ~15-25 GB RSS. Multiple independent triggers observed:Trigger 1: Startup — no user action needed
Simply launching OpenCode Desktop causes Bun memory to spike from ~600 MB to 15+ GB within 60 seconds, then crash. This reproduces consistently.
Trigger 2:
/compactcommandRunning
/compacton a session with 264 messages (2.0 MB content) causes memory to grow from 635 MB to 15+ GB in ~86 seconds, then crash with:Crash report:
https://bun.report/1.3.11/ea1af24e28mhGuhooC6gngQs347Myw16Jg3rgNCYKERNEL32.DLLut0LCSntdll.dll4/hjBA0eNoFwcENACAMAsBVWM1ENHyosXzc3js53LyYxTrigger 3: Stale git index.lock in snapshot directory
A zero-byte stale
index.lockin~/.local/share/opencode/snapshot/<hash>/caused the snapshot service to enter a retry storm, generating 845 index.lock errors and spawning 136 orphaned git child processes. This drove opencode-cli.exe to 11,203 handles / 5.3 GB working set before crash (normal: ~335 handles / 635 MB).Additional data
$LOCALAPPDATA/ai.opencode.desktop/logs/opencode-desktop_2026-04-20_17-39-35.logcontains the full crash traceWorkaround attempted
index.lockfiles and restarting fixed Trigger 3Root cause aligns with Bun PR #29327 — the
ssize_t→inttruncation inuv_fs_readon Windows.Brendonovich commentedon May 18, 2026
Desktop no longer uses
opencode-cli