Memory leak during prolonged usage
Description
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
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.
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 just leaving it running? Doing nothing? What version of macos are u running then? I have never had that happen
@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.