Skip to content

Session grew to 88G! #1126

Closed
Closed

Description

@giddie

I ran out of disk space while opencode was running. Investigating, I can see two sessions in ~/.local/share/opencode/project/.../snapshot. One is 2G, and the other is 88G. I can see they're git repos under the hood, and the large one is corrupted (due to a forced shutdown). There are no pack files in there, though, just a lot of objects. The uncorrupted (2.2G) session has several large objects, but I can't figure out what they are -- git cat-file -p ... outputs something that is still zlib-encoded.

Activity

  1. KannaKuron commented on Jul 18, 2025

    @KannaKuron

    related: #1120

  2. self-assigned this
    on Jul 18, 2025
  3. thdxr commented on Jul 18, 2025

    @thdxr
    Member

    woah that is crazy. i'll take a look and we should probably limit how far back the snapshot goes

  4. giddie commented on Jul 18, 2025

    @giddie
    Author

    [edit] I had completely bamboozled myself in this post; sorry for the noise.

  5. giddie commented on Jul 18, 2025

    @giddie
    Author

    Still no real idea why this is happening, but it's consistently reproducible. This is an Elixir project. Anything I can provide that could help? The logs don't seem to indicate anything unusual.

  6. giddie commented on Jul 18, 2025

    @giddie
    Author

    OK, I'm reversing the bamboozle: the data stored in there is a history of the work tree? I think the issue may be related to the fact that my dev container's home directory is mounted inside .local in my worktree. It's in my global gitignore file, but it may be that there's some recursion happening if opencode is not ignoring it as expected.

  7. giddie commented on Jul 19, 2025

    @giddie
    Author

    Yeah, this was the issue. My global gitignore isn't available in the dev container, so I tried adding /.local/ to .git/info/exclude, but it seems this is not considered by git add . in opencode's snapshot repo. This could be something worth considering? I doubt I'm the only one who'll try this kind of setup. Everything works fine if the ignore rule is added to .gitignore, but this isn't ideal for me. Another workaround is obviously to ensure opencode's data is not stored beneath the work root.

  8. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

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