High RAM usage in latest release #1845

Open
opened 2026-02-16 17:32:54 -05:00 by yindo · 13 comments
Owner

Originally created by @iyang1016 on GitHub (Sep 26, 2025).

Originally assigned to: @thdxr on GitHub.

Issue Description

The high RAM usage seems related to the Bun runtime.

Environment Details

  • OS: Windows 11
  • Runtime: Bun and Go installed
  • Observation: The Bun process shows unusually high memory consumption

Additional Context

  • Previous versions did not use as much RAM
  • This issue started occurring after recent updates that use Bun
  • Memory usage appears to be specifically tied to Bun processes

Question

Are there recommended Bun config changes or troubleshooting steps for memory control that could help resolve this issue?

Originally created by @iyang1016 on GitHub (Sep 26, 2025). Originally assigned to: @thdxr on GitHub. ## Issue Description The high RAM usage seems related to the Bun runtime. ## Environment Details - **OS**: Windows 11 - **Runtime**: Bun and Go installed - **Observation**: The Bun process shows unusually high memory consumption ## Additional Context - Previous versions did not use as much RAM - This issue started occurring after recent updates that use Bun - Memory usage appears to be specifically tied to Bun processes ## Question Are there recommended Bun config changes or troubleshooting steps for memory control that could help resolve this issue?
Author
Owner

@github-actions[bot] commented on GitHub (Sep 26, 2025):

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

  • #2585: Reports massive memory use (29GB RAM) when opening opencode with large files - similar symptoms of high RAM usage
  • #496: Describes absurd amount of CPU and memory usage during path completion - also mentions high memory consumption
  • #804: Reports memory leak that eats up gigabytes of RAM until system crash (closed but similar behavior)

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

@github-actions[bot] commented on GitHub (Sep 26, 2025): This issue might be a duplicate of existing issues. Please check: - #2585: Reports massive memory use (29GB RAM) when opening opencode with large files - similar symptoms of high RAM usage - #496: Describes absurd amount of CPU and memory usage during path completion - also mentions high memory consumption - #804: Reports memory leak that eats up gigabytes of RAM until system crash (closed but similar behavior) Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 26, 2025):

Hmm I don't think anything should've changed in this department, what model are you using?

We did include reasoning by default for gpt-5 and that will make thinking blocks render but Idk if that'd be the issue here since I imagine that'd be eating cpu rather than ram i dont see anything else in recent release affecting it.

Dax has been working on rewriting the tui and it should address a whole bunch of performance issues

@rekram1-node commented on GitHub (Sep 26, 2025): Hmm I don't think anything should've changed in this department, what model are you using? We did include reasoning by default for gpt-5 and that will make thinking blocks render but Idk if that'd be the issue here since I imagine that'd be eating cpu rather than ram i dont see anything else in recent release affecting it. Dax has been working on rewriting the tui and it should address a whole bunch of performance issues
Author
Owner

@iyang1016 commented on GitHub (Sep 26, 2025):

Hmm I don't think anything should've changed in this department, what model are you using?

We did include reasoning by default for gpt-5 and that will make thinking blocks render but Idk if that'd be the issue here i dont see anything else in recent release affecting it.

Dax has been working on rewriting the tui and it should address a whole bunch of performance issues

hello sir, I use Z.ai: glm-4.5( Coding Plan)

@iyang1016 commented on GitHub (Sep 26, 2025): > Hmm I don't think anything should've changed in this department, what model are you using? > > We did include reasoning by default for gpt-5 and that will make thinking blocks render but Idk if that'd be the issue here i dont see anything else in recent release affecting it. > > Dax has been working on rewriting the tui and it should address a whole bunch of performance issues hello sir, I use Z.ai: glm-4.5( Coding Plan)
Author
Owner

@iyang1016 commented on GitHub (Sep 26, 2025):

Update: I tried rolling back to v0.11.7 and noticed that Bun's RAM usage is much lower compared to v0.11.8. On v0.11.8, Bun's memory usage keeps increasing and can reach almost 4GB even on moderate usage, but in v0.11.7, RAM usage stays well below 600MB. This suggests the recent update introduced a significant memory regression.

@iyang1016 commented on GitHub (Sep 26, 2025): Update: I tried rolling back to v0.11.7 and noticed that Bun's RAM usage is much lower compared to v0.11.8. On v0.11.8, Bun's memory usage keeps increasing and can reach almost 4GB even on moderate usage, but in v0.11.7, RAM usage stays well below 600MB. This suggests the recent update introduced a significant memory regression.
Author
Owner

@rekram1-node commented on GitHub (Sep 26, 2025):

interesting well thx for looking at it ill take a look

@rekram1-node commented on GitHub (Sep 26, 2025): interesting well thx for looking at it ill take a look
Author
Owner

@edwarbudiman commented on GitHub (Oct 7, 2025):

also experiencing this on my m1 mac (using sonnet 4.5 model from anthropic)

if i notice, the memory high usage will occured if opencode trying to read file(s), (start with permission to read),
after it read all of my file, the memory gone up and even if it already done reading, the memory still didnt go down.

So, what i do was to quit session and then start opencode again using /session

@edwarbudiman commented on GitHub (Oct 7, 2025): also experiencing this on my m1 mac (using sonnet 4.5 model from anthropic) if i notice, the memory high usage will occured if opencode trying to read file(s), (start with permission to read), after it read all of my file, the memory gone up and even if it already done reading, the memory still didnt go down. So, what i do was to quit session and then start opencode again using /session
Author
Owner

@rekram1-node commented on GitHub (Oct 7, 2025):

@edwarbudiman could be the lsp servers, what kinda project is it? You can disable them if u need to

lsp: {
serverId: {
disabled: true
}
}

for full list of servers see here: https://opencode.ai/docs/lsp/#built-in

@rekram1-node commented on GitHub (Oct 7, 2025): @edwarbudiman could be the lsp servers, what kinda project is it? You can disable them if u need to lsp: { serverId: { disabled: true } } for full list of servers see here: https://opencode.ai/docs/lsp/#built-in
Author
Owner

@edwarbudiman commented on GitHub (Oct 15, 2025):

hmm, interesting @rekram1-node
as per 0.15.3 version, i try to re-create the situation, the memory still okay,
will let you know if something happened ever again.
thanks

@edwarbudiman commented on GitHub (Oct 15, 2025): hmm, interesting @rekram1-node as per 0.15.3 version, i try to re-create the situation, the memory still okay, will let you know if something happened ever again. thanks
Author
Owner

@rekram1-node commented on GitHub (Oct 15, 2025):

sounds good!

@rekram1-node commented on GitHub (Oct 15, 2025): sounds good!
Author
Owner

@dhruvkej9 commented on GitHub (Dec 31, 2025):

@rekram1-node @thdxr Still the memory usage is very high I am using "1.0.218" version of opencode and the RAM opencode consumes is very high.

When can we expect it to be fixed, as it remains a critical blocker and opencode crashes after sometime

I just have playwright MCP enabled for debugging

@dhruvkej9 commented on GitHub (Dec 31, 2025): @rekram1-node @thdxr Still the memory usage is very high I am using "1.0.218" version of opencode and the RAM opencode consumes is very high. When can we expect it to be fixed, as it remains a critical blocker and opencode crashes after sometime I just have playwright MCP enabled for debugging
Author
Owner

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

@dhruvkej9 can u provide steps to reproduce? Can u provide a session that causes it?

@rekram1-node commented on GitHub (Dec 31, 2025): @dhruvkej9 can u provide steps to reproduce? Can u provide a session that causes it?
Author
Owner

@aniel300 commented on GitHub (Jan 22, 2026):

why is it doing this form time to time, will it recover?

Image
@aniel300 commented on GitHub (Jan 22, 2026): why is it doing this form time to time, will it recover? <img width="843" height="582" alt="Image" src="https://github.com/user-attachments/assets/de35d512-19ea-4b5a-af26-e5c3aedc373b" />
Author
Owner

@JoakuGit commented on GitHub (Jan 31, 2026):

+1

I just had the same problem! I have 64GB of RAM, and out of nowhere, Bun started using 40GB of RAM. That's a big problem with Bun. I did some research, and there are issues with Bun related to this.

@JoakuGit commented on GitHub (Jan 31, 2026): +1 I just had the same problem! I have 64GB of RAM, and out of nowhere, Bun started using 40GB of RAM. That's a big problem with Bun. I did some research, and there are issues with Bun related to this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1845