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

Closed
opened 2026-02-16 17:42:14 -05:00 by yindo · 1 comment
Owner

Originally created by @d3vr on GitHub (Dec 30, 2025).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @d3vr on GitHub (Dec 30, 2025). Originally assigned to: @rekram1-node on GitHub. ### 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
yindo added the opentuibugperf labels 2026-02-16 17:42:14 -05:00
yindo closed this issue 2026-02-16 17:42:14 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 30, 2025):

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

  • #6172: High CPU usage (100%+) during LLM streaming in long sessions due to O(n) text buffer rendering - similar CPU/memory spiral issues
  • #6213: Memory leak during prolonged usage
  • #6119: TUI fails to render with critical memory leak (72.5G VIRT) on startup
  • #5220: Glob search uses 100% of CPU - similar CPU spike behavior
  • #5363: opencode eating 70gb of memory - related memory consumption issue
  • #4315: Memory stays unbounded: ACP session map + compacted tool outputs - related unbounded memory growth

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

@github-actions[bot] commented on GitHub (Dec 30, 2025): This issue might be a duplicate of existing issues. Please check: - #6172: High CPU usage (100%+) during LLM streaming in long sessions due to O(n) text buffer rendering - similar CPU/memory spiral issues - #6213: Memory leak during prolonged usage - #6119: TUI fails to render with critical memory leak (72.5G VIRT) on startup - #5220: Glob search uses 100% of CPU - similar CPU spike behavior - #5363: opencode eating 70gb of memory - related memory consumption issue - #4315: Memory stays unbounded: ACP session map + compacted tool outputs - related unbounded memory growth Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3996