Skip to content

Possible memory leak on OpenCode 1.2.15 #15920

@RyanGst

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

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions