Skip to content

[Bug] TUI fails to render with raw ANSI output and critical memory leak (72.5G VIRT) on startup #6119

Closed

Description

@roymecat

Description

I am trying to run opencode on my Debian 13.1. The tool fails to launch the TUI properly. Instead of showing the interface, it floods the terminal with raw ANSI escape sequences (specifically mouse reporting codes like ^[[<35;84;4M).

Crucially, I observed via htop that the process immediately consumed an abnormal amount of memory: 71.9G of VIRT. This suggests a massive memory leak or an infinite allocation loop during the initialization phase.

OpenCode version

latest version

Steps to reproduce

Environment: Debian 13.1(Headless, connected via SSH).
Run the command opencode in a project directory.
The terminal output becomes corrupted with raw escape codes.
Check process status in htop.

Screenshot and/or share link

Image Image

Operating System

Debian 13.1

Terminal

No response

Activity

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

    @github-actions
    Contributor

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

    These issues report similar symptoms of TUI rendering failures, ANSI escape sequence corruption, and memory/hanging issues on Linux systems. Feel free to ignore if your specific case differs from these.

  3. MorganMarshall commented on Feb 2, 2026

    @MorganMarshall

    Bump

  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