Skip to content

OpenTUI causes crashes and heavy memory usage #3798

Closed

Description

@yudgnahk

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 3, 2025
  2. github-actions commented on Nov 3, 2025

    @github-actions
    Contributor

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

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

  3. yudgnahk commented on Nov 3, 2025

    @yudgnahk
    ContributorAuthor

    Load this session:
    Image

    Session not found:
    Image

    Then crash when I load again:
    Image

  4. yudgnahk commented on Nov 3, 2025

    @yudgnahk
    ContributorAuthor

    Another session loading with black screen only, loading forever.

    Image
  5. rekram1-node commented on Nov 3, 2025

    @rekram1-node
    Contributor

    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

  6. yudgnahk commented on Nov 3, 2025

    @yudgnahk
    ContributorAuthor

    @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.

  7. rekram1-node commented on Nov 3, 2025

    @rekram1-node
    Contributor

    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!

  8. jerome-benoit commented on Nov 3, 2025

    @jerome-benoit
    Contributor

    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.

  9. rekram1-node commented on Nov 3, 2025

    @rekram1-node
    Contributor

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

  10. thdxr commented on Nov 6, 2025

    @thdxr
    Member

    can you try again with latest?

  11. rjshrjndrn commented on Nov 6, 2025

    @rjshrjndrn

    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.

  12. kommander commented on Nov 12, 2025

    @kommander
    Contributor

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

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 opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions