Skip to content

HUGE snapshot folder #6845

Closed
ariane-emory/opencode
#157

Description

@0fflineuser

Description

Hi,
I was setting up a nixos vm and found that I had way less space on my disk than usual but I didn't download anything very big for a while.
So I launched filelight to see what was going on and turns out the ~/.local/share/opencode folder was 169gb!!!!!
Sorry, but wtf, how is that even possible. 😂
It seems to be stuff in ~/.local/share/opencode/snapshot/global/objects/pack
Is it a known issue, I didn't really find anything ?

I update opencode almost always the day or next day when there is an update, so maybe it was a bug in earlier versions ?

Image

Plugins

No response

OpenCode version

1.0.223

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Arch Linux

Terminal

kitty

Activity

  1. added
    perfIndicates a performance issue or need for optimization
    on Jan 4, 2026
  2. ja-mf commented on Jan 21, 2026

    @ja-mf

    same here, this was a session lasting 1-2 days

    Image

    according to #9290 (comment) it should be fixed but I think a filter to ignore tracking for massive files and snapshot folder watching and alert is actually appropriate, currently this is dangerous when working in folders with large datasets (not even tracked with git).

  3. miguelnavarro89 commented on Jan 22, 2026

    @miguelnavarro89

    same for me, opencode is basically useless unless I remove snapshot folder every hour.

  4. rekram1-node commented on Jan 22, 2026

    @rekram1-node
    Contributor

    @miguelnavarro89 it has been released, and yes u can disable snapshotting just do:

    snapshot: false in ur opencode.json

  5. Cyberistic commented on Mar 20, 2026

    @Cyberistic

    if you're doing any kind of ML training, do NOT leave opencode open while it trains and saves weights. 😵‍💫

  6. StephenAnboer commented on Mar 21, 2026

    @StephenAnboer

    my .local\share\opencode\snapshot\global\objects was 300gb, ran out all of my C

  7. lzqxd commented on Mar 25, 2026

    @lzqxd

    My opencode also had the same issue. I simply deleted all the hash files in the snapshot/global/objects directory, and then when I used opencode again, there was no problem anymore.

  8. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    This should be fixed by commit 0a80ef4 which adds a 2MB file size limit for snapshotting. Files over 2MB are now excluded from git snapshots.

  9. jialigit2 commented on Mar 25, 2026

    @jialigit2

    why this issue is closed, opencode crashes for the disk full issue very often. very annoying. which version is fixed for this?

  10. erikdemarco commented on Apr 26, 2026

    @erikdemarco

    This should be fixed by commit 0a80ef4 which adds a 2MB file size limit for snapshotting. Files over 2MB are now excluded from git snapshots.

    It doesn't.

    Image
  11. xWTF commented on Jun 15, 2026

    @xWTF

    This should be fixed by commit 0a80ef4 which adds a 2MB file size limit for snapshotting. Files over 2MB are now excluded from git snapshots.

    @thdxr Thanks for the info. However said commit doesn't solve the problem if you have a huge repo with many files < 2MB. I'd like to suggest for a configurable hard cap (e.g. per workspace) for snapshots.

    For example:

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnixperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions