Skip to content

High RAM usage in latest release #2805

Closed

Description

@iyang1016

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?

Activity

  1. github-actions commented on Sep 26, 2025

    @github-actions
    Contributor

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

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

  2. rekram1-node commented on Sep 26, 2025

    @rekram1-node
    Contributor

    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

  3. iyang1016 commented on Sep 26, 2025

    @iyang1016
    Author

    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)

  4. iyang1016 commented on Sep 26, 2025

    @iyang1016
    Author

    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.

  5. rekram1-node commented on Sep 26, 2025

    @rekram1-node
    Contributor

    interesting well thx for looking at it ill take a look

  6. edwarbudiman commented on Oct 7, 2025

    @edwarbudiman

    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

  7. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Contributor

    @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

  8. edwarbudiman commented on Oct 15, 2025

    @edwarbudiman

    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

  9. rekram1-node commented on Oct 15, 2025

    @rekram1-node
    Contributor

    sounds good!

  10. dhruvkej9 commented on Dec 31, 2025

    @dhruvkej9

    @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

  11. rekram1-node commented on Dec 31, 2025

    @rekram1-node
    Contributor

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

  12. aniel300 commented on Jan 22, 2026

    @aniel300

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

    Image
  13. JoakuGit commented on Feb 1, 2026

    @JoakuGit

    +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.

  14. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

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

  15. jemag commented on Apr 2, 2026

    @jemag

    should have been marked as stale first, this doesn't leave the opportunity to keep the issue open when it is still relevant (which is the case)

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