Skip to content

OOM during session summary on fresh sessions (RangeError: Out of memory in worker.js) #19951

Closed

Description

@Foovar

Description

I'm consistently hitting an out-of-memory error during session summary generation in OpenCode.
The issue happens even when I start a completely new session, so it does not appear to depend on a single long-running chat.

fails while generating the session summary and crashes with:

[16:40:52.447] INFO (#466): session summary failed RangeError: Out of memory
at stringify (unknown)
at writeJson (/$bunfs/root/src/cli/cmd/tui/worker.js:83737:38)
at <anonymous> (/$bunfs/root/src/cli/cmd/tui/worker.js:110968:37)
at processTicksAndRejections (native:7:39)
at SessionProcessor.handleEvent (/$bunfs/root/src/cli/cmd/tui/worker.js:243110:33)
at SessionProcessor.handleEvent (definition) (/$bunfs/root/src/cli/cmd/tui/worker.js:242814:46)
at SessionProcessor.process (/$bunfs/root/src/cli/cmd/tui/worker.js:243165:72)
at SessionProcessor.process (definition) (/$bunfs/root/src/cli/cmd/tui/worker.js:243100:43)

This happens across multiple OpenCode instances, including newly opened ones.

Plugins

None

OpenCode version

1.3.6

Steps to reproduce

  1. Open OpenCode in the terminal.
  2. Start a new/fresh session using models Codex 5.3, Minimax 2.7, and Kimi 2.5.
  3. Enter an initial instruction (e.g., "make a commit") and wait while it processes the request.
  4. Observe the crash with RangeError: Out of memory.

Screenshot and/or share link

Image

Operating System

macOS 26.4 (Build 25E246), Darwin 25.4.0

Terminal

iTerm.app (TERM=xterm-256color)

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    perfIndicates a performance issue or need for optimization
    on Mar 29, 2026
  2. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

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

    If your issue is distinct (e.g., it reproduces on truly fresh sessions with minimal data), please add that context so maintainers can differentiate it from the above.

  3. Helios12345 commented on Mar 30, 2026

    @Helios12345

    Updated from 1.3.0 (was working fine before!) to 1.3.5 today (later on same problem with 1.3.7):
    on a new session (reproduceable!) after i enter the prompt it's possible, that nothing happens, or it works a little bit, then it's stuck - as if it would simply stop, that's it. you can tell Opencode, that it should continue, then it will continue, but only for a few more seconds, then it's stuck again.

    i have that problem with the Kimi K2.5 Coding Plan, but not with Minimax M2.7 Coding Plan.
    Also reverted lot of stuff from Opencode.json (MCP, permissions,...) - but still the same problem with Kimi K2.5 Coding Plan, i also completely deleted .local\share\opencode as a test.
    Weird...

  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

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiperfIndicates 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