anomalyco / anomalyco/opencode
Desktop crashes when restoring a large binary file tab
@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
- Open a large binary file in the desktop editor.
- Leave the editor tab open.
- 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
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.