Session grew to 88G! #797

Closed
opened 2026-02-16 17:28:21 -05:00 by yindo · 7 comments
Owner

Originally created by @giddie on GitHub (Jul 18, 2025).

Originally assigned to: @thdxr on GitHub.

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.

Originally created by @giddie on GitHub (Jul 18, 2025). Originally assigned to: @thdxr on GitHub. 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.
yindo closed this issue 2026-02-16 17:28:21 -05:00
Author
Owner

@KannaKuron commented on GitHub (Jul 18, 2025):

related: #1120

@KannaKuron commented on GitHub (Jul 18, 2025): related: #1120
Author
Owner

@thdxr commented on GitHub (Jul 18, 2025):

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

@thdxr commented on GitHub (Jul 18, 2025): woah that is crazy. i'll take a look and we should probably limit how far back the snapshot goes
Author
Owner

@giddie commented on GitHub (Jul 18, 2025):

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

@giddie commented on GitHub (Jul 18, 2025): [edit] I had completely bamboozled myself in this post; sorry for the noise.
Author
Owner

@giddie commented on GitHub (Jul 18, 2025):

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.

@giddie commented on GitHub (Jul 18, 2025): 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.
Author
Owner

@giddie commented on GitHub (Jul 18, 2025):

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.

@giddie commented on GitHub (Jul 18, 2025): 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.
Author
Owner

@giddie commented on GitHub (Jul 19, 2025):

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.

@giddie commented on GitHub (Jul 19, 2025): 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.
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

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

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#797