Skip to content

new terminal using opencode in home dir with snapshot: true will occupy huge storage #16336

Closed as not planned

Description

@Shana-AE

Description

I think it's common to use opencode to solve some common issue without projects.
And then it's natural to just use opencode in a new created terminal which usually located in home dir.
That's the question, if snapshot: true the whole home dir will be created a snapshot and occupies the storage quickly.
If we set snapshot: false, we need to set snapshot: true in each project folder, that's not convinient.
I think it's intuitive to disable snapshot when opencode opens in a non git folder, at lease disable it in home dir

Plugins

None

OpenCode version

1.2.17

Steps to reproduce

  1. open a new terminal
  2. located in home dir
  3. use opencode
  4. ask some question
  5. the storage is filled by snapshot

Screenshot and/or share link

No response

Operating System

Windows 11 Archlinux wsl

Terminal

Windows Terminal

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 6, 2026
  2. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is specifically about snapshot being triggered in a non-git/home directory rather than snapshot leaks, it may be distinct enough to keep open. Please review the above and let the maintainers know if this covers your case.

  3. ahmad12-ui commented on Mar 7, 2026

    @ahmad12-ui

    Hi, I’m interested in working on this bug.
    If no one is currently fixing it, I’d like to investigate the issue and submit a PR.

  4. assigned and unassigned on Apr 26, 2026
  5. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  7. piknockyou commented on Sep 30, 2026

    @piknockyou

    One addition for anyone landing here: before settling for "snapshot": false, check whether the home folder is accidentally a git repository - an accidental .git up there is a common reason home sessions start producing full snapshots.

    From the folder where you start opencode: git rev-parse --show-toplevel

    • If it prints your home folder (or another broad parent folder): that repo is almost certainly accidental - delete that .git (usually empty; rename if unsure) and start opencode inside a real project folder; the giant snapshot scan goes away with it, no config change needed.
    • If it reports no repository, or prints a real project of yours: then your plan applies - keep "snapshot": false globally and enable it per project where you want undo.

    For me the first case was it: a stray .git in home, and removing it ended the huge snapshots entirely.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions