High Memory Usage on macOS 15.7 (Apple M4, 16GB, arm64) #6694

Open
opened 2026-02-16 18:04:58 -05:00 by yindo · 9 comments
Owner

Originally created by @haosenssss on GitHub (Jan 18, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

On macOS 15.7 (Apple Silicon), the app’s memory usage becomes abnormally high during normal usage (or stays extremely high even when idle). This impacts overall system performance and may indicate a memory leak or some resources not being released properly.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @haosenssss on GitHub (Jan 18, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description On macOS 15.7 (Apple Silicon), the app’s memory usage becomes abnormally high during normal usage (or stays extremely high even when idle). This impacts overall system performance and may indicate a memory leak or some resources not being released properly. ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bugperf labels 2026-02-16 18:04:58 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 18, 2026):

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

  • #7261: v1.1.6 still has memory bloat - heap not released + MCP orphan processes (macOS Apple Silicon with similar symptoms)
  • #5363: opencode eating 70gb of memory? (similar memory bloat on macOS)
  • #5700: Too high memory usage (general memory usage issue)
  • #9151: Memory leak (related memory management issue)
  • #9156: Memory leak: Uncleaned timeouts, intervals, and subscriptions (potential resource leaks)
  • #9157: Memory leak: Instance disposal doesn't clean up plugins or cached resources (cleanup on shutdown)

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

@github-actions[bot] commented on GitHub (Jan 18, 2026): This issue might be a duplicate of existing issues. Please check: - #7261: v1.1.6 still has memory bloat - heap not released + MCP orphan processes (macOS Apple Silicon with similar symptoms) - #5363: opencode eating 70gb of memory? (similar memory bloat on macOS) - #5700: Too high memory usage (general memory usage issue) - #9151: Memory leak (related memory management issue) - #9156: Memory leak: Uncleaned timeouts, intervals, and subscriptions (potential resource leaks) - #9157: Memory leak: Instance disposal doesn't clean up plugins or cached resources (cleanup on shutdown) Feel free to ignore if none of these address your specific case.
Author
Owner

@mario-loomia commented on GitHub (Jan 18, 2026):

The memory bloat is so bad, it is hard to use. Had to cap memory so it is not crashing my system. 25GB+
(Fedora 43) Would be amazing if you could look into this 🙏

@mario-loomia commented on GitHub (Jan 18, 2026): The memory bloat is so bad, it is hard to use. Had to cap memory so it is not crashing my system. 25GB+ (Fedora 43) Would be amazing if you could look into this 🙏
Author
Owner

@rekram1-node commented on GitHub (Jan 18, 2026):

Can you share any steps to reproduce, any pattern of when it happens, are you writing rust code (special ask because rust lsp eats a lot of mem)

@rekram1-node commented on GitHub (Jan 18, 2026): Can you share any steps to reproduce, any pattern of when it happens, are you writing rust code (special ask because rust lsp eats a lot of mem)
Author
Owner

@mario-loomia commented on GitHub (Jan 19, 2026):

In terms of LSPs I got Typescript and Eslint.
I also kicked out a plugin I was using to be sure.
It feels like a memory leak FWIW.

@mario-loomia commented on GitHub (Jan 19, 2026): In terms of LSPs I got Typescript and Eslint. I also kicked out a plugin I was using to be sure. It feels like a memory leak FWIW.
Author
Owner

@kov commented on GitHub (Jan 20, 2026):

Could you give it a try with #9693 applied?

@kov commented on GitHub (Jan 20, 2026): Could you give it a try with #9693 applied?
Author
Owner

@mario-loomia commented on GitHub (Jan 21, 2026):

I gave your branch a good go, unfortunately I kept running into bun crashes (not sure if related) so I could not really gather data for longer sessions.
That being said, 1.1.28 shows improved memory handling. I can clearly see how the allocated memory is released again.

@mario-loomia commented on GitHub (Jan 21, 2026): I gave your branch a good go, unfortunately I kept running into bun crashes (not sure if related) so I could not really gather data for longer sessions. That being said, 1.1.28 shows improved memory handling. I can clearly see how the allocated memory is released again.
Author
Owner

@mario-loomia commented on GitHub (Jan 21, 2026):

Fix message history cleanup to prevent memory leaks in TUI

That went in with 1.1.27 and sounds like what I am seeing.

@mario-loomia commented on GitHub (Jan 21, 2026): > Fix message history cleanup to prevent memory leaks in TUI That went in with 1.1.27 and sounds like what I am seeing.
Author
Owner

@hyperbolic-c commented on GitHub (Jan 31, 2026):

same issue on mac air m4.

Image
@hyperbolic-c commented on GitHub (Jan 31, 2026): same issue on mac air m4. <img width="425" height="70" alt="Image" src="https://github.com/user-attachments/assets/46d53796-ec67-4578-8446-6a34558fe6b4" />
Author
Owner

@GaryReckard commented on GitHub (Feb 2, 2026):

I've been experiencing this almost daily. Usually, I notice it rise to the upper 20s or 30GB. This morning, after leaving it up overnight, it got over 50GB... had to restart Activity Monitor for it to even register it.
Also, not sure why I see opencode-cli rather than opencode, like other users show.

Image
@GaryReckard commented on GitHub (Feb 2, 2026): I've been experiencing this almost daily. Usually, I notice it rise to the upper 20s or 30GB. This morning, after leaving it up overnight, it got over 50GB... had to restart Activity Monitor for it to even register it. Also, not sure why I see `opencode-cli` rather than `opencode`, like other users show. <img width="1618" height="648" alt="Image" src="https://github.com/user-attachments/assets/b831d774-35c6-4575-9b85-8ebb9d8cc9cf" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6694