Skip to content

🐛 Issue: opencode memory usage keeps growing over time #11399

Closed

Description

@console3

Hi,
I’ve noticed that opencode / opencode-cli consumes an unusually large amount of memory over time, and the usage keeps increasing during normal usage.

At startup, memory usage looks reasonable, but after some time of usage, it grows continuously and does not seem to be released.

Eventually, it reaches multiple GBs, which is not expected for this type of application.

⸻

Environment
• OS: macOS (Apple Silicon)
• opencode version: 1.1.47
• Installation method: other
• Running locally, no Docker / VM involved

⸻

Observed Behavior
• On startup:
• Memory usage is normal (a few hundred MB)
• After continued usage:
• Memory usage keeps increasing
• No obvious drop after tasks finish
• In some cases:
• opencode-cli reaches 10–15 GB+ memory usage
• Another related process (opencode) also remains resident with hundreds of MB

I’ve attached screenshots from macOS Activity Monitor showing the memory usage over time.

⸻

Screenshots
• opencode-cli using ~15.5 GB memory
• Related opencode process still active (~500+ MB)
• Memory usage inc

reases with usage, not immediately on startup

Image Image

Activity

  1. added
    perfIndicates a performance issue or need for optimization
    on Jan 31, 2026
  2. github-actions commented on Jan 31, 2026

    @github-actions
    Contributor

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

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

  3. thefeshin commented on Feb 20, 2026

    @thefeshin
    Image this is still happening, after I updated the opencode to 1.2.8, it became like this.
  4. thdxr commented on Apr 2, 2026

    @thdxr
    Member

    Closing in favor of #20695 where we're collecting all memory-related problems. Please follow that issue for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

perfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions