GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode eating 70gb of memory? · Issue #5363 · anomalyco/opencode

opencode eating 70gb of memory? #5363

New issue
Copy link
New issue
Copy link
Closed
Closed
opencode eating 70gb of memory?#5363
Copy link
Assignees
rekram1-node
Labels
bugSomething isn't workingperfIndicates a performance issue or need for optimization

Description

@albertilagan
albertilagan
opened on Dec 11, 2025
Issue body actions

Description

Left opencode session on background (tmux session) not doing anything but an existing session open.

OpenCode version

1.0.141

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

macOS 26.1

Terminal

Ghostty + tmux

Reacted by Andras Lassu, Daemon, Hans Stephensen, yope, Alex Heron, copeugne, Ross, Julien Valéry, Andrey Baksalyar, aniel300 and 15 more

Activity

Next
  1. albertilagan
    added
    bugSomething isn't working
    on Dec 11, 2025
  2. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 11, 2025
  3. github-actions commented on Dec 11, 2025

    @github-actions
    github-actionsBot
    on Dec 11, 2025 – with GitHub Actions
    Contributor
    More actions

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

    • Single opencode session is consuming 23+GB of memory #3995: Single opencode session is consuming 23+GB of memory
    • Uses a huge amount of memory #3013: Uses a huge amount of memory
    • OpenTUI causes crashes and heavy memory usage #3798: OpenTUI causes crashes and heavy memory usage
    • Memory stays unbounded: ACP session map + compacted tool outputs #4315: Memory stays unbounded: ACP session map + compacted tool outputs
    • Excessive memory usage. #3530: Excessive memory usage (closed)
    • High RAM usage in latest release #2805: High RAM usage in latest release

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

  4. ham-zax commented on Dec 11, 2025

    @ham-zax
    ham-zax
    on Dec 11, 2025
    More actions

    yeah same, it is asking for that much access, i cant use the unlimt command in linux, and i suspect memory leak too. i have to close the opencode completely after some hour and restart it otherwise it would get hang

  5. supersongssr commented on Dec 11, 2025

    @supersongssr
    supersongssr
    on Dec 11, 2025
    More actions

    yeah same , Macbook M1 , macos 26.1 (25B78) . eating 7GB of memory .

  6. rekram1-node
    self-assigned this
    on Dec 11, 2025
  7. rekram1-node
    added
    perfIndicates a performance issue or need for optimization
    and removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 11, 2025
  8. rekram1-node commented on Dec 11, 2025

    @rekram1-node
    rekram1-node
    on Dec 11, 2025
    Member
    More actions

    Can anyone share a session causing this?

    opencode export > session.json

    You can dm privately too

    I can't replicate this

  9. albertilagan commented on Dec 12, 2025

    @albertilagan
    albertilagan
    on Dec 12, 2025
    ContributorAuthor
    More actions

    Can anyone share a session causing this?

    opencode export > session.json

    You can dm privately too

    I can't replicate this

    how/where do I dm you sir?

  10. rekram1-node commented on Dec 12, 2025

    @rekram1-node
    rekram1-node
    on Dec 12, 2025
    Member
    More actions

    x or discord? click my gh profile for details

  11. albertilagan commented on Dec 12, 2025

    @albertilagan
    albertilagan
    on Dec 12, 2025
    ContributorAuthor
    More actions

    x or discord? click my gh profile for details

    don't have x, I do have discord but link on profile says invalid.

  12. rekram1-node commented on Dec 12, 2025

    @rekram1-node
    rekram1-node
    on Dec 12, 2025
    Member
    More actions

    dm:

    aidenc9727 on discord

    Reacted by Albert Ilagan
  13. PSU3D0 commented on Dec 12, 2025

    @PSU3D0
    PSU3D0
    on Dec 12, 2025
    More actions

    Same issue. Opencode consumed 15Gb Memory in one instance. With multiple parallel instances, ended up crashing my Xserver (Ubuntu 24.04) with 128Gb memory

    Common pattern across all sessions:

    2-3 opencode instances per git repo
    Average 2-3 compactions per session
    All running parallel

  14. noneatarrival commented on Dec 18, 2025

    @noneatarrival
    noneatarrival
    on Dec 18, 2025
    More actions

    Same issue. Mac using Sequoia 15.7.2. node balloons to >70GB within 30 seconds... suspect it is b/c one of the sub-folders w/in the folder I start in has many large files, so my bad 😓

  15. 17 remaining items

  16. Sharktheone commented on Jan 22, 2026

    @Sharktheone
    Sharktheone
    on Jan 22, 2026
    More actions

    For me it also was rust. I mean rust_analyzer can take up it's ram. And I've seen opencode spawning multiple LSP instances at the same time. It would make sense that the ram is stacking up, allthough that would probably be another process (unless they are using a WASM / embedded build of rust_analyzer, I doubt).

    So maybe it is rust_analyzer spamming opencode with LSP things which opencode just keeps around for no real reason?

    Reacted by Tempext AI
  17. beingsuz commented on Jan 23, 2026

    @beingsuz
    beingsuz
    on Jan 23, 2026
    More actions
    Image

    same using the bun install command

  18. johkorn commented on Jan 23, 2026

    @johkorn
    johkorn
    on Jan 23, 2026
    More actions

    Same issue with RAM usage here on a daily basis now. I have opencode working on PHP projects, no rust involved. Unfortunately not really useable right now.

  19. Sharktheone commented on Jan 23, 2026

    @Sharktheone
    Sharktheone
    on Jan 23, 2026
    More actions
    Image

    same using the bun install command

    Is that just bun install hanging? I had the same at some point but didn't check the ram usage.

    I'm also getting it on macos (as the initial issue also was)

    Image
  20. beingsuz commented on Jan 24, 2026

    @beingsuz
    beingsuz
    on Jan 24, 2026
    More actions
    Image same using the bun install command

    Is that just bun install hanging? I had the same at some point but didn't check the ram usage.

    I'm also getting it on macos (as the initial issue also was)

    Image

    Not at all when installing using Bun after running it runs under Bun process for some reason.

  21. d4rky-pl commented on Feb 11, 2026

    @d4rky-pl
    d4rky-pl
    on Feb 11, 2026
    More actions

    I just experienced the memory spike issue, opencode inside Docker container. The CPU went 100%, the MacBook fans started spinning like crazy and the memory use kept climbing up to 5 GB. I switched to new session and it was still going.

    Image

    In my case the issue was with LSP server, specifically pyright-langserver. I've managed to capture htop output:

    Image

    Once the CPU burn calmed down it's still using tons of RAM:

    Image

    This RAM usage displayed in the opencode debug apparently does not take LSP servers into account:

    Image

    Opencode 1.1.53, I forgot to update this morning, so if this is known issue / no longer helpful then apologies for the noise.

  22. zmlgit commented on Feb 25, 2026

    @zmlgit
    zmlgit
    on Feb 25, 2026
    More actions

    我在使用opencode+oh-my-opencode时,被吃掉80G内存后,强制让omo创建新任务时复用会话,内存不再增长了。opencode在会话结束后不会清理会话,导致内存泄漏。

  23. aniel300 commented on Feb 25, 2026

    @aniel300
    aniel300
    on Feb 25, 2026
    More actions

    the facts that this issue still hasn't been addressed is beyond me.

  24. dhruvkej9 commented on Feb 25, 2026

    @dhruvkej9
    dhruvkej9
    on Feb 25, 2026
    More actions

    the facts that this issue still hasn't been addressed is beyond me.

    The issue now is partially resolved for TUI, now after SQL migration it uses lesser memory (But now another issue is there, which dax says will be resolved in future, that we can't see the whole chat history)

  25. itxtoledo commented on Mar 2, 2026

    @itxtoledo
    itxtoledo
    on Mar 2, 2026
    More actions

    same here 20gb

  26. code-xhyun commented on Mar 3, 2026

    @code-xhyun
    code-xhyun
    on Mar 3, 2026
    More actions

    same :(

    Reacted by nishikawa7863
  27. wojons commented on Mar 5, 2026

    @wojons
    wojons
    on Mar 5, 2026
    More actions

    @rekram1-node

    I been dealing with this for a few weeks with my personal machine(128gb macos) and my work machine (24gb macos). I have to go and clear opencode every now and then and i will have a few different issues.

    1. I will have the proceses of past opencode run still in my task list but i dont see in the terminal more or less feels like an orphaned processes
    2. if i look at lsof for a large opencode session i will see tons of file pointers open tty everything it feels like it is not doing a good job of its internal house keeping.

    I typically will see the system start at 750mb of ram usage for reopening an existing session. When ever a command is issued i start getting new tile handlers open if i do lsof -p <process group> i will have my repo root (where i open the opencode tui) multiple times open and multiple /dev/ttyd022 open. There are are a lot of unix sockets open. What i see less of but still multiple are connections to the same sqlite databse files

    Reacted by nishikawa7863
    Reacted by nishikawa7863
  28. marcusquinn commented on Mar 6, 2026

    @marcusquinn
    marcusquinn
    on Mar 6, 2026
    More actions

    This may be caused by bash-language-server's hardcoded --external-sources flag triggering unbounded ShellCheck memory growth. We hit the same pattern — 73 concurrent shellcheck processes consuming 17.8 GB, with individual processes growing to 3-5 GB RSS.

    The upstream root cause fix has been merged: bash-lsp/bash-language-server#1376 adds a shellcheckExternalSources config option. Setting it to false omits --external-sources entirely.

    Immediate workaround — set this env var before running opencode:

    SHELLCHECK_EXTERNAL_SOURCES=false

    Once opencode bumps its bash-language-server dependency to include this change, the config will be available natively. See also #16269 for the full analysis and #16271 for the OPENCODE_DISABLE_LSP mitigation PR.

  29. thdxr commented on Apr 2, 2026

    @thdxr
    thdxr
    on Apr 2, 2026
    Member
    More actions

    Closing in favor of #20695 where we're collecting all memory-related problems. Please follow that issue for updates.

  30. thdxr
    closed this as completedon Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

bugSomething isn't workingperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.