Skip to content

[BUG] Filtering the model list and resulting in an empty list causes a memory leak + high cpu spiral #6433

Closed

Description

@d3vr

Description

When filtering the model selection list in the TUI, typing a character that results in no matches (an empty list) causes the application to enter a CPU and memory spiral. This results in 100% CPU usage and rapid memory consumption, eventually crashing the system or requiring the process to be killed manually.

OpenCode version

1.0.209

Steps to reproduce

  • Fresh session
  • /models or <leader>+m
  • Type a query that results in an empty list, e.g: "unknown"
  • OpenCode hangs and causes a memory leak and high cpu usage spiral

Expected Behavior
The list should simply display an empty state or "No results found" message without affecting system performance or stability.

Screenshot and/or share link

No response

Operating System

Arch Linux

Terminal

Alacritty

Activity

  1. added
    bugSomething isn't working
    on Dec 30, 2025
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    perfIndicates a performance issue or need for optimization
    on Dec 30, 2025
  3. github-actions commented on Dec 30, 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.

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