opencode icon indicating copy to clipboard operation
opencode copied to clipboard

opencode eating 70gb of memory?

Open albertilagan opened this issue 1 month ago • 13 comments

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

albertilagan avatar Dec 11 '25 07:12 albertilagan

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

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

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

github-actions[bot] avatar Dec 11 '25 07:12 github-actions[bot]

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

ham-zax avatar Dec 11 '25 07:12 ham-zax

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

supersongssr avatar Dec 11 '25 08:12 supersongssr

Can anyone share a session causing this?

opencode export > session.json

You can dm privately too

I can't replicate this

rekram1-node avatar Dec 11 '25 22:12 rekram1-node

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?

albertilagan avatar Dec 12 '25 04:12 albertilagan

x or discord? click my gh profile for details

rekram1-node avatar Dec 12 '25 04:12 rekram1-node

x or discord? click my gh profile for details

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

albertilagan avatar Dec 12 '25 04:12 albertilagan

dm:

aidenc9727 on discord

rekram1-node avatar Dec 12 '25 04:12 rekram1-node

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

PSU3D0 avatar Dec 12 '25 18:12 PSU3D0

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 😓

noneatarrival avatar Dec 18 '25 12:12 noneatarrival

Same here.... grows until I nearly OOM then I have to restart.

JayBusch avatar Dec 21 '25 07:12 JayBusch