opencode icon indicating copy to clipboard operation
opencode copied to clipboard

OpenCode nuked my storage (318 GB added)

Open pythonlearner1025 opened this issue 1 day ago • 1 comments

Description

I asked claude to investigate and here's the report:

Summary

Opencode's snapshot system has consumed 318GB of disk space by:

  1. Tracking the entire home directory as a git worktree
  2. Leaving orphaned temp pack files with no garbage collection

Storage Breakdown

Type Size Files Description
Orphaned temp packs 284 GB 6 Failed/interrupted pack operations, never cleaned
Loose git objects 34 GB 590,600 Actual snapshot data
Total 318 GB For a CLI tool with no storage settings

Orphaned Files

File Size Date
tmp_pack_qM0CSW 108 GB Dec 31
tmp_pack_Latw37 61 GB Dec 31
tmp_pack_Tt4SKV 54 GB Dec 31
tmp_pack_nuK5V1 27 GB Dec 31
tmp_pack_vSc9OC 25 GB Jan 9
tmp_pack_hJO3AO 7.8 GB Jan 1
$ git count-objects -vH
size-garbage: 283.84 GiB

Issues

- No cleanup mechanism — no git gc, no pruning, no temp file cleanup
- No storage limits — grows unbounded
- No user visibility — no warnings, no settings, no documentation
- Tracks entire home directory — not just project folders

Workaround

rm -rf ~/.local/share/opencode/snapshot/

Expected

- Track project directories only, not $HOME
- Clean up temp files on startup
- Run periodic garbage collection
- Implement storage limits
- Warn users or expose settings

### Plugins

_No response_

### OpenCode version

_No response_

### Steps to reproduce

_No response_

### Screenshot and/or share link

<img width="994" height="667" alt="Image" src="https://github.com/user-attachments/assets/fc9d49c5-75f0-46be-8712-2024ad614504" />

### Operating System

macOS 26.01

### Terminal

iTerm2

pythonlearner1025 avatar Jan 18 '26 21:01 pythonlearner1025