OpenTUI causes crashes and heavy memory usage #2513

Closed
opened 2026-02-16 17:36:03 -05:00 by yindo · 11 comments
Owner

Originally created by @yudgnahk on GitHub (Nov 3, 2025).

Originally assigned to: @kommander on GitHub.

Description

I got this crash when trying to load a session in the session list. It said that the session not found then crash.
That session was terminated by myself when the opencode became too laggy. I've check the Activity monitor at that time, it reported that opencode had use 14GBs of memory.

OpenCode version

1.0.15

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

macOS 15.7.1

Terminal

iTerm2

Originally created by @yudgnahk on GitHub (Nov 3, 2025). Originally assigned to: @kommander on GitHub. ### Description I got this crash when trying to load a session in the session list. It said that the session not found then crash. That session was terminated by myself when the opencode became too laggy. I've check the Activity monitor at that time, it reported that opencode had use 14GBs of memory. ### OpenCode version 1.0.15 ### Steps to reproduce _No response_ ### Screenshot and/or share link <img width="1060" height="1056" alt="Image" src="https://github.com/user-attachments/assets/064006b0-69b3-4d09-a29a-2d979f97b597" /> ### Operating System macOS 15.7.1 ### Terminal iTerm2
yindo added the opentuibug labels 2026-02-16 17:36:03 -05:00
yindo closed this issue 2026-02-16 17:36:03 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 3, 2025):

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

  • #3013: Reports huge memory usage that keeps increasing until opencode gets stuck during extensive AI sessions
  • #2805: High RAM usage in latest release, specifically tied to Bun processes
  • #2585: Massive memory use (29GB reported) when opencode tries to load large files
  • #3669: Unable to load old sessions, conversation history flashes and disappears (similar session loading issues)
  • #1215: Crashes on prompt after deleting sessions, with session-related memory access errors

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

@github-actions[bot] commented on GitHub (Nov 3, 2025): This issue might be a duplicate of existing issues. Please check: - #3013: Reports huge memory usage that keeps increasing until opencode gets stuck during extensive AI sessions - #2805: High RAM usage in latest release, specifically tied to Bun processes - #2585: Massive memory use (29GB reported) when opencode tries to load large files - #3669: Unable to load old sessions, conversation history flashes and disappears (similar session loading issues) - #1215: Crashes on prompt after deleting sessions, with session-related memory access errors Feel free to ignore if none of these address your specific case.
Author
Owner

@yudgnahk commented on GitHub (Nov 3, 2025):

Load this session:
Image

Session not found:
Image

Then crash when I load again:
Image

@yudgnahk commented on GitHub (Nov 3, 2025): Load this session: <img width="1060" height="816" alt="Image" src="https://github.com/user-attachments/assets/33ab16ad-4075-42e7-81dc-54848b88dfba" /> Session not found: <img width="1049" height="915" alt="Image" src="https://github.com/user-attachments/assets/4874163b-b9a4-483b-bd4d-0aa4da455138" /> Then crash when I load again: <img width="1059" height="1052" alt="Image" src="https://github.com/user-attachments/assets/1155a99d-c019-4053-90a1-76e9ffa1163a" />
Author
Owner

@yudgnahk commented on GitHub (Nov 3, 2025):

Another session loading with black screen only, loading forever.

Image
@yudgnahk commented on GitHub (Nov 3, 2025): Another session loading with black screen only, loading forever. <img width="1062" height="1081" alt="Image" src="https://github.com/user-attachments/assets/6fcf5b29-79bd-4f91-8695-e8e2422fddb5" />
Author
Owner

@rekram1-node commented on GitHub (Nov 3, 2025):

Is this because of opentui? Or is it because you made a giant session to test the limits of session lists and performance there? Does this session work fine on old opencode?

I know u have a PR with the diff stuff and Ill take a look but to help us narrow down for the time being these may be good questions to know answers to

@rekram1-node commented on GitHub (Nov 3, 2025): Is this because of opentui? Or is it because you made a giant session to test the limits of session lists and performance there? Does this session work fine on old opencode? I know u have a PR with the diff stuff and Ill take a look but to help us narrow down for the time being these may be good questions to know answers to
Author
Owner

@yudgnahk commented on GitHub (Nov 3, 2025):

@rekram1-node honestly, I don't know the reason why. I can get the session list immediately with the current opencode version.

With the old version (before v1.0.0):

  • Get list session: slow (~10 seconds).
  • Session detail: work well.

With new new version (v1.0.15):

  • Get list session: fast
  • Session detail: not working well.
    • Can't get one of my latest session: don't know why => just black screen. The session is described below:
{
  "id": "ses_5c44fd2d3ffepRC82zPWENtICF",
  "version": "0.15.30",
  "projectID": "598a424a62b89b2f7a5ba86dfcccd507051ab377",
  "directory": "/home/khanghld27/big_file_reader",
  "title": "Investigating 500MB file server crash",
  "time": {
    "created": 1761937993004,
    "updated": 1761994168699
  },
  "summary": {
    "diffs": []
  }
}
  • I just started a new session, ask it to look for the session directory, to investigate why I can't log that session. The session is described below:
{
  "id": "ses_5b7d0873fffeYprN0gfMLnPi6P",
  "version": "1.0.15",
  "projectID": "598a424a62b89b2f7a5ba86dfcccd507051ab377",
  "directory": "/home/khanghld27/big_file_reader",
  "title": "Investigating session freeze in opencode",
  "time": {
    "created": 1762147662016,
    "updated": 1762147817910
  },
  "summary": {
    "diffs": []
  }
}
  • Then while the opencode was working, it became frozen. I checked the memory usage, it went to 14GB for opencode. Then I stopped the opencode, then opened it again, trying to load the last session, and got the crash.

If you need anything else, please let me know.

@yudgnahk commented on GitHub (Nov 3, 2025): @rekram1-node honestly, I don't know the reason why. I can get the session list immediately with the current opencode version. With the old version (before v1.0.0): - Get list session: slow (~10 seconds). - Session detail: work well. With new new version (v1.0.15): - Get list session: fast - Session detail: not working well. + Can't get one of my latest session: don't know why => just black screen. The session is described below: ``` { "id": "ses_5c44fd2d3ffepRC82zPWENtICF", "version": "0.15.30", "projectID": "598a424a62b89b2f7a5ba86dfcccd507051ab377", "directory": "/home/khanghld27/big_file_reader", "title": "Investigating 500MB file server crash", "time": { "created": 1761937993004, "updated": 1761994168699 }, "summary": { "diffs": [] } } ``` + I just started a new session, ask it to look for the session directory, to investigate why I can't log that session. The session is described below: ``` { "id": "ses_5b7d0873fffeYprN0gfMLnPi6P", "version": "1.0.15", "projectID": "598a424a62b89b2f7a5ba86dfcccd507051ab377", "directory": "/home/khanghld27/big_file_reader", "title": "Investigating session freeze in opencode", "time": { "created": 1762147662016, "updated": 1762147817910 }, "summary": { "diffs": [] } } ``` + Then while the opencode was working, it became frozen. I checked the memory usage, it went to 14GB for opencode. Then I stopped the opencode, then opened it again, trying to load the last session, and got the crash. If you need anything else, please let me know.
Author
Owner

@rekram1-node commented on GitHub (Nov 3, 2025):

Ah the blank screen is some rendering bug I think, some people said they can scroll to it but yeah needs to be fixed

thanks for the details we will address this!

@rekram1-node commented on GitHub (Nov 3, 2025): Ah the blank screen is some rendering bug I think, some people said they can scroll to it but yeah needs to be fixed thanks for the details we will address this!
Author
Owner

@jerome-benoit commented on GitHub (Nov 3, 2025):

Bitten by similar issue.

To reproduce with 1.0.15:

  • checkout https://github.com/poolifier/poolifier
  • start opencode in the repo
  • prompt with something like: "run the tinybench benchmarks and analyze the results"
  • watch opencode/opentui memory usage grows up to several Go, freeze, your computer being not responsive and the OS OOM killer kill opencode.

And yes, it was working before the version 1.

@jerome-benoit commented on GitHub (Nov 3, 2025): Bitten by similar issue. To reproduce with 1.0.15: * checkout https://github.com/poolifier/poolifier * start opencode in the repo * prompt with something like: "run the tinybench benchmarks and analyze the results" * watch opencode/opentui memory usage grows up to several Go, freeze, your computer being not responsive and the OS OOM killer kill opencode. And yes, it was working before the version 1.
Author
Owner

@rekram1-node commented on GitHub (Nov 3, 2025):

OO okay that's really helpful ty @jerome-benoit

@rekram1-node commented on GitHub (Nov 3, 2025): OO okay that's really helpful ty @jerome-benoit
Author
Owner

@thdxr commented on GitHub (Nov 6, 2025):

can you try again with latest?

@thdxr commented on GitHub (Nov 6, 2025): can you try again with latest?
Author
Owner

@rjshrjndrn commented on GitHub (Nov 6, 2025):

The new UI is taking around ~30% consistently to analyze a small code base while old v0.15.31 starts with a spike 50 and then uses around ~7-11%.
Checked with the latest version.

@rjshrjndrn commented on GitHub (Nov 6, 2025): The new UI is taking around ~30% consistently to analyze a small code base while old v0.15.31 starts with a spike 50 and then uses around ~7-11%. Checked with the latest version.
Author
Owner

@kommander commented on GitHub (Nov 12, 2025):

A lot of improvements went into the latest versions, is this one any better?

@kommander commented on GitHub (Nov 12, 2025): A lot of improvements went into the latest versions, is this one any better?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2513