anomalyco / anomalyco/opencode
[Desktop] sidecar process crashes with OOM - JavaScript heap out of memory
@Hona is already working on this.
Since Sep 6, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
markdown
Description
OpenCode desktop app sidecar process crashes repeatedly due to memory leak. The sidecar process grows unbounded until it hits the V8 heap limit (~3GB+) and is killed by the OS with an OOM error.
Environment
OS: Windows 10
App version: opencode-ai@1.18.29 (desktop)
Sidecar port: Random high port (e.g.,
Memory at crash: ~3.1 GB
Logs
[2026-09-02 08:34:32.642:ERROR:electron/shell/common/node_bindings.cc:189] OOM error in V8: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
[2026-09-02 08:34:32.643] stderr { message: "\r\n" + "<--- Last few GCs --->\r\n" + "\r\n" + "[12860:000058D400204000] 3840105 ms: Mark-Compact (reduce) 3108.7 (3198.4) -> 3108.7 (3134.6) MB, pooled: 0.0 MB, 106.09 / 0.00 ms (average mu = 0.965, current mu = 0.258) last resort; GC in old space requested\r\n" + "[12860:000058D400204000] 3840201 ms: Mark-Compact (reduce) 3108.7 (3134.6) -> 3108.6 (3133.4) MB, pooled: 0.0 MB, 96.40 / 0.00 ms (average mu = 0.932, current mu = 0.000) last resort; GC in old space requested\r\n" }
Reproduction Steps
Launch OpenCode desktop app
Open any session
Wait ~5-10 minutes
Sidecar exits with code 0
App restarts sidecar on new port
Loop repeats indefinitely
Expected Behavior
Sidecar should run stably without unbounded memory growth.
Actual Behavior
Sidecar crashes after consuming ~3GB RAM, causing the app to become unresponsive.
Additional Context
CLI version (opencode run) works fine - only affects desktop app
Multiple crash dumps in ~/AppData/Roaming/ai.opencode.desktop/Crashpad/reports/
Observed 6 crash cycles within 20 minutes
No user messages needed - background memory leak
Workaround
Use CLI: opencode run 'task' or opencode (interactive TUI)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.