Skip to content

Memory leak, LSP spam, 1 Frame per minute #13796

Closed

Description

@corrm

Description

  • Just starting OpenCode without doing anything, and it starts eating my RAM (+17 GB)!.
  • Just starting OpenCode spawn a git processes that eat my 24-thread CPU at 100% usage!.
  • Open any old session and keep spawn multi git processes.
  • For some reason it starts a LOT of rustc processes while it is literally not doing anything, just opening an old session! Yes, it's not coming from neovim or vscode. comes from opencode.

One more thing, even if I close the terminal, opencode and git processes are still alive! Killing them manually is necessary!

Yes, it's 1 Frame per minute TUI

Plugins

"opencode-gemini-auth@latest", "opencode-websearch-cited@latest", "@franlol/opencode-md-table-formatter@latest", "@nick-vi/opencode-type-inject", "opencode-antigravity-auth@latest", "oh-my-opencode"

OpenCode version

1.2.5

Steps to reproduce

No response

Screenshot and/or share link

Image Image Image Image

Operating System

Arch Linux btw

Terminal

Kitty

Activity

  1. added
    perfIndicates a performance issue or need for optimization
    on Feb 16, 2026
  2. github-actions commented on Feb 16, 2026

    @github-actions
    Contributor

    This issue appears to be a duplicate of existing critical memory and performance issues that the team is actively working on:

    Potential Duplicates:

    Your symptoms (RAM spike, git processes at 100% CPU, rustc processes spawning) are consistent with the cascading memory leak and child process management issues already documented in #13230 and #13513.

    Related Issue:

    The team is tracking these under the broader memory leak initiative. Consider subscribing to #13230 or #13513 for updates on the fixes (which include bounding child processes, implementing LSP diagnostics eviction, and addressing unbounded output buffers in the bash tool).

  3. marcusquinn commented on Mar 6, 2026

    @marcusquinn

    The RAM consumption you're seeing (+17 GB just from starting opencode) is likely caused by bash-language-server's hardcoded --external-sources flag triggering unbounded ShellCheck memory growth. We observed the exact same pattern — individual shellcheck processes growing to 3-5 GB RSS, compounding across sessions.

    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

    See #16269 for the full analysis. The git/rustc CPU issues you mention may be separate problems, but the RAM explosion is very likely this.

  4. thdxr commented on Apr 2, 2026

    @thdxr
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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