You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OOM during session summary on fresh sessions (RangeError: Out of memory in worker.js) #19951
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
Open OpenCode in the terminal.
Start a new/fresh session using models Codex 5.3, Minimax 2.7, and Kimi 2.5.
Enter an initial instruction (e.g., "make a commit") and wait while it processes the request.
This issue might be a duplicate of existing issues. Please check:
Blank session history after restart when summary diffs embed huge file contents #17622: Blank session history after restart when summary diffs embed huge file contents — same root cause (oversized session summary diffs being serialized via writeJson/stringify in worker.js), different failure mode (OOM crash during stringify vs blank history on reload)
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.
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...
Activity
github-actions commentedon Mar 29, 2026
This issue might be a duplicate of existing issues. Please check:
writeJson/stringifyinworker.js), different failure mode (OOM crash during stringify vs blank history on reload)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.
Helios12345 commentedon Mar 30, 2026
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...
thdxr commentedon Apr 2, 2026
Closing in favor of #20695 where we're collecting all memory-related problems. Please follow that issue for updates.