anomalyco / anomalyco/opencode

Desktop crashes when restoring a large binary file tab

Open
#42,578 2 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

OpenCode Desktop crashes on startup when it restores an editor tab for a large binary file.

The desktop sidecar tries to load the full file through the file content endpoint. A file around 300 MB exceeds the embedded V8 heap limit. The sidecar exits with code 5, and the UI shows Failed to fetch. The crash repeats on every launch because the tab is restored.

Steps to reproduce
  1. Open a large binary file in the desktop editor.
  2. Leave the editor tab open.
  3. Quit and reopen OpenCode Desktop.
Expected behavior

The app should not load large binary files as text. It should detect binary files or enforce a size limit, skip the tab on restore, and show a clear message.

Actual behavior

The sidecar crashes with:

OOM error in V8: Zone Allocation failed - process out of memory

The UI then shows Failed to fetch.

Environment
  • OpenCode Desktop 1.18.18
  • macOS
Notes

Removing the large binary editor tab from saved UI state stops the crash loop.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.