Skip to content

Possible memory leak on OpenCode 1.2.15 #15920

Closed

Description

@RyanGst

Description

After using OpenCode for a while, I noticed multiple opencode processes remaining alive at the same time. Each process is holding an significant amount of memory.

Over time this looks like memory/process accumulation.

➜ ps aux | grep opencode
ryangst          22513   8.8  0.0 435310096   7552 s001  S+    8:44PM   0:00.16 curl -# -L -o /var/folders/4l/g8tld4j94r5d8pfhlpbn8xz80000gp/T//opencode_install_22421/opencode-darwin-arm64.zip https://github.com/anomalyco/opencode/releases/download/v1.2.16/opencode-darwin-arm64.zip
ryangst          22401   1.2  3.7 508992432 620976 s001  S+    8:44PM   0:04.37 opencode
ryangst          20498   1.0  0.8 508977232 136720   ??  S     8:42PM   0:08.05 opencode
ryangst          45934   1.0  0.4 508983360  72464 s009  S+    1:32PM   2:25.06 opencode
ryangst           3390   0.6  0.5 509095136  81952 s005  S+    9:53AM   6:01.37 opencode
ryangst          19357   0.1  0.8 508989472 141696   ??  S     8:41PM   0:08.70 opencode
ryangst           5570   0.0  0.0 508616032   5424 s005  S+    9:54AM   0:06.20 /Users/ryangst/.opencode/bin/opencode run /Users/ryangst/.local/share/opencode/bin/node_modules/@vue/language-server/bin/vue-language-server.js --stdio
ryangst          22579   0.0  0.0 435300320   1408 s003  S+    8:44PM   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox --exclude-dir=.venv --exclude-dir=venv opencode

Plugins

none

OpenCode version

1.2.15

Steps to reproduce

  1. Open Ghostty
  2. Open new tab
  3. Run opencode
  4. Close tab
  5. ps aux | grep opencode

Screenshot and/or share link

I also captured this in Activity Monitor, where multiple opencode processes appear at the same time:

Image

Operating System

MacOs 26.3

Terminal

Ghostty (7665efc3a161e3424267846216e913ba324aeb1c) https://github.com/ghostty-org/ghostty/commits/7665efc3a

Activity

  1. github-actions commented on Mar 3, 2026

    @github-actions
    Contributor

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

    If your issue is the same, please consider adding a thumbs up or additional context to one of those issues instead.

  2. added
    perfIndicates a performance issue or need for optimization
    on Mar 3, 2026
  3. 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