Single opencode session is consuming 23+GB of memory #2635

Open
opened 2026-02-16 17:36:34 -05:00 by yindo · 6 comments
Owner

Originally created by @bcardarella on GitHub (Nov 6, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Image

I can provide someone with the /share results on Discord if they ping me

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @bcardarella on GitHub (Nov 6, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description <img width="521" height="73" alt="Image" src="https://github.com/user-attachments/assets/61383e10-157b-4c81-be8a-d5c40644107a" /> I can provide someone with the /share results on Discord if they ping me ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bugperf labels 2026-02-16 17:36:34 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2025):

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

  • #2585: Very similar memory consumption issue where opencode used 29GB of RAM when processing large files. The root cause was identified as opencode loading a very large folder (.chunkhound with 27GB). Deleting large unnecessary files/folders solved the problem.

Feel free to ignore if none of these address your specific case.

Debugging suggestion: Check if your project directory contains any unusually large files or folders that opencode might be trying to process. You can share more details about your project structure or the /share results to help identify the root cause.

@github-actions[bot] commented on GitHub (Nov 6, 2025): This issue might be a duplicate of existing issues. Please check: - #2585: Very similar memory consumption issue where opencode used 29GB of RAM when processing large files. The root cause was identified as opencode loading a very large folder (.chunkhound with 27GB). Deleting large unnecessary files/folders solved the problem. Feel free to ignore if none of these address your specific case. **Debugging suggestion**: Check if your project directory contains any unusually large files or folders that opencode might be trying to process. You can share more details about your project structure or the /share results to help identify the root cause.
Author
Owner

@rekram1-node commented on GitHub (Nov 6, 2025):

@bcardarella share results would be great ill ping u

@rekram1-node commented on GitHub (Nov 6, 2025): @bcardarella share results would be great ill ping u
Author
Owner

@istarkov commented on GitHub (Nov 9, 2025):

See https://github.com/sst/opencode/issues/4084 do you have large binaries/tsv/csv?

@istarkov commented on GitHub (Nov 9, 2025): See https://github.com/sst/opencode/issues/4084 do you have large binaries/tsv/csv?
Author
Owner

@AdiKsOnDev commented on GitHub (Dec 10, 2025):

wtf? This is on a very compact repository BTW, so there are probably some memory leaks somewhere in the codebase

Image

UPD: Nevermind this was not on a small repo, it was on a medium-sized repo

@AdiKsOnDev commented on GitHub (Dec 10, 2025): wtf? This is on a very compact repository BTW, so there are probably some memory leaks somewhere in the codebase <img width="501" height="66" alt="Image" src="https://github.com/user-attachments/assets/ba51a089-c6c8-4321-910f-4157a9c82c3b" /> UPD: Nevermind this was not on a small repo, it was on a medium-sized repo
Author
Owner

@bcardarella commented on GitHub (Dec 10, 2025):

Largest file in my repo is 11MB.

@bcardarella commented on GitHub (Dec 10, 2025): Largest file in my repo is 11MB.
Author
Owner

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

What os are u using

@rekram1-node commented on GitHub (Dec 10, 2025): What os are u using
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2635