opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Memory leak during prolonged usage

Open FurryWolfX opened this issue 2 weeks ago • 1 comments

Description

Image

Memory usage is increasing.

OpenCode version

1.0.203

Steps to reproduce

prolonged usage

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

FurryWolfX avatar Dec 26 '25 17:12 FurryWolfX

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

  • #6172: High CPU usage (100%+) during LLM streaming in long sessions due to O(n) text buffer rendering - includes detailed analysis of memory not being reclaimed
  • #5700: Too high memory usage
  • #4315: Memory stays unbounded: ACP session map + compacted tool outputs - identifies specific mechanisms causing memory leaks
  • #5363: opencode eating 70gb of memory - similar symptom of memory usage during prolonged sessions
  • #3013: Uses a huge amount of memory
  • #5220: Glob search uses 100% of CPU - related performance degradation

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

github-actions[bot] avatar Dec 26 '25 18:12 github-actions[bot]

same here, opencode eats all my ram on macos if i leave it running for like 1 hour + and it just does not kill the memory unless i kill opencode

rexbrahh avatar Dec 30 '25 23:12 rexbrahh

@rexbrahh just leaving it running? Doing nothing? What version of macos are u running then? I have never had that happen

rekram1-node avatar Dec 31 '25 00:12 rekram1-node

@rexbrahh just leaving it running? Doing nothing? What version of macos are u running then? I have never had that happen

no not idle, for complex prompts where it just works non-stop across several auto compactions which sometimes takes over an hour.

macos tahoe 26.3 beta 1 (always been on developer betas since 26), using opencode on ghostty tip release

Previously I was daily driving codex cli even had several of them working in parallel on git worktrees and it was fine.

I also posted this issue in oh-my-opencode repo which i'm using with opencode. but this issue was already happening before i started using oh-my-opencode.

Also what accompanies this memory issue with opencode and oh-my-opencode is severe input lags. very often it's 30 second + of input lag where the window just freezes -- no scrolling, no keyboard input, no mouse input, etc.

I suspect it's an issue with the bun runtime underneath.

rexbrahh avatar Dec 31 '25 00:12 rexbrahh