anomalyco / anomalyco/opencode

Bun process memory exceeds 1GB and grows unboundedly — opencode 1.18.14 on Windows

Open
#41,026 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 7, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

The Bun process backing opencode consumes over 1 GB of memory (RSS) during normal usage. Memory grows continuously over time and is never released back to the OS, consistent with Bun's mimalloc allocator not returning freed pages.

This appears to be the same class of issue as #35107 (structuredClone heap pressure) and #35847 (12h session memory leak), but is reproducible on the latest version 1.18.14 with shorter sessions — it does not require 12+ hours to manifest.

Environment
Item Value
opencode 1.18.14
Bun 1.3.14
OS Windows (win32, x64)
Terminal Windows Terminal
Plugins

No response

OpenCode version

1.18.14

Steps to reproduce
  1. Install opencode 1.18.14 on Windows (Bun v1.3.14 bundled)
  2. Start a normal interactive session with multiple rounds of conversation
  3. Monitor the Bun process memory via Task Manager
  4. Observe RSS growing past 1 GB and not releasing
Screenshot and/or share link

No response

Operating System

Windows (win32, x64)

Terminal

Windows Terminal

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.