You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v2.0.20: OpenCode reaches 28 GiB RSS (90.5% RAM) while idle or working #54286
OpenCode v2.0.20 consumed nearly all system RAM in a host snapshot: 29,459,164 KiB RSS (about 28.1 GiB, 90.5% of RAM) after only 12 minutes of process uptime. The reporter says the problem can occur both while OpenCode is idle and while it is working. They also report that OpenCode is eventually SIGKILLed; the signal/termination was not captured in this snapshot.
This is a separate reproduction report from #41502: that report describes RSS growth during an active turn on an earlier v2 next build, while this report concerns v2.0.20 and says the problem also occurs while idle.
Environment
OpenCode: opencode v2.0.20
OS: Omarchy (Arch-based Linux), x86_64
Kernel: 7.2.5-3-omarchy
Evidence
A host-side process/resource snapshot captured on 2026-10-10 at 15:10:48 +05:30 showed:
Process
RSS
CPU
Elapsed
OpenCode PID 4151
29,459,164 KiB (~28.1 GiB; 90.5% RAM)
13.5%
12:28
OpenCode child PID 4167
121,880 KiB (~119 MiB)
5.0%
12:27
The visible descendants included several low-resource npm/MCP processes. In this sample the main OpenCode process was the dominant RAM consumer. This is a single snapshot, so it does not show the RSS growth rate or establish the underlying cause.
Reproduction / scope
The reporter has observed the issue both with OpenCode idle and during active work. Exact project type and triggering action are not yet isolated. A time-series sample has not yet been collected.
Expected behavior
OpenCode should keep resident memory bounded while idle and during normal work, and should not consume nearly all host RAM or be terminated due to memory pressure.
Actual behavior
The process reached about 28.1 GiB RSS (90.5% of RAM) after 12:28 elapsed. The reporter says it eventually receives SIGKILL; that termination was not captured in the diagnostic sample.
Thanks for the report. To work out what is using the memory, we need a few details, ideally in your own words and kept short:
What you were doing: how you start OpenCode (opencode TUI, opencode serve, desktop app), and what was happening when memory went up. If it happens while idle, was a session open, and roughly how big was it (tokens / number of tool calls)?
Which process grows: the output of ps -o pid,ppid,rss,etime,args -p 4151,4167 (or the equivalent PIDs next time), so we can tell whether it's the TUI or the background service.
Install method: for example the install script, npm @opencode/cli, or AUR.
MCP servers and plugins that are configured.
How quickly it grows: a few RSS samples over time, for example while true; do date; ps -o pid,rss,args -C opencode; sleep 30; done. Also, does it still happen with a fresh session in an empty directory?
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
These existing reports may already cover your problem. They're ordered from most to least likely:
We're closing this as not planned because we haven't heard back with the details we asked for. A single ps snapshot isn't enough for us to reproduce the 28 GiB RSS or tell which existing memory issue it belongs to.
If it happens again, please reply here with which process grows (TUI or serve service), how you installed OpenCode, your MCP servers and plugins, what you were doing, and a few RSS samples taken over time. We can reopen it then. In the meantime, these issues may already cover your problem:
Activity
opencode-agent commentedon Oct 10, 2026
Thanks for the report. To work out what is using the memory, we need a few details, ideally in your own words and kept short:
opencodeTUI,opencode serve, desktop app), and what was happening when memory went up. If it happens while idle, was a session open, and roughly how big was it (tokens / number of tool calls)?ps -o pid,ppid,rss,etime,args -p 4151,4167(or the equivalent PIDs next time), so we can tell whether it's the TUI or the background service.@opencode/cli, or AUR.while true; do date; ps -o pid,rss,args -C opencode; sleep 30; done. Also, does it still happen with a fresh session in an empty directory?You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
These existing reports may already cover your problem. They're ordered from most to least likely:
serveservice grows to 25–32 GB RSS and doesn't shrink backVariableVince commentedon Oct 11, 2026
@mrvigneshvt Was this solved for you since v2.0.21? From #51761 it looks like it hopefully should be
opencode-agent commentedon Oct 13, 2026
We're closing this as not planned because we haven't heard back with the details we asked for. A single
pssnapshot isn't enough for us to reproduce the 28 GiB RSS or tell which existing memory issue it belongs to.If it happens again, please reply here with which process grows (TUI or
serveservice), how you installed OpenCode, your MCP servers and plugins, what you were doing, and a few RSS samples taken over time. We can reopen it then. In the meantime, these issues may already cover your problem:Thanks for reporting it.