Skip to content

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

Closed as not planned

Description

@chengxxf

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

Activity

  1. github-actions commented on Aug 7, 2026

    @github-actions
    Contributor

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

    If your issue is distinct from the above (e.g. it reproduces faster or has a different trigger), it may still be worth filing separately — but please consider adding a heap snapshot via the instructions in #20695, as that's the most actionable data the team can use to diagnose unbounded Bun RSS growth.

  2. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions