TUI crashes when resizing terminal window (Windows / CMD) #4827

Open
opened 2026-02-16 17:45:36 -05:00 by yindo · 5 comments
Owner

Originally created by @CodeNewbie88 on GitHub (Jan 12, 2026).

Originally assigned to: @kommander on GitHub.

Description

Describe the bug

When running OpenCode in TUI mode on Windows, the application crashes immediately when the terminal window is resized (by dragging the window edge).
This happens consistently and makes the TUI unusable whenever the terminal size changes.

To Reproduce

Steps to reproduce the behavior:

  1. Open Command Prompt (CMD) on Windows,run opencode

  2. Start OpenCode TUI

  3. While the TUI is running, resize the CMD window (drag to change width or height),The application crashes immediately.

Expected behavior

The TUI should handle terminal resize events gracefully and continue running, with the layout reflowing or redrawing correctly.

Environment

  • OS: Windows

  • Terminal: Command Prompt (CMD)

  • OpenCode version: 1.1.13

  • Installation method: npm

Plugins

oh-my-opencode

OpenCode version

1.1.13

Steps to reproduce

  1. Open Command Prompt (CMD) on Windows,run opencode

  2. Start OpenCode TUI

  3. While the TUI is running, resize the CMD window (drag to change width or height),The application crashes immediately.

Screenshot and/or share link

No response

Operating System

Windows 10

Terminal

Windows terminal(CMD)

Originally created by @CodeNewbie88 on GitHub (Jan 12, 2026). Originally assigned to: @kommander on GitHub. ### Description ### Describe the bug When running OpenCode in TUI mode on Windows, the application crashes immediately when the terminal window is resized (by dragging the window edge). This happens consistently and makes the TUI unusable whenever the terminal size changes. ### To Reproduce Steps to reproduce the behavior: 1. Open Command Prompt (CMD) on Windows,run opencode 2. Start OpenCode TUI 3. While the TUI is running, resize the CMD window (drag to change width or height),The application crashes immediately. ### Expected behavior The TUI should handle terminal resize events gracefully and continue running, with the layout reflowing or redrawing correctly. ### Environment - OS: Windows - Terminal: Command Prompt (CMD) - OpenCode version: 1.1.13 - Installation method: npm ### Plugins oh-my-opencode ### OpenCode version 1.1.13 ### Steps to reproduce 1. Open Command Prompt (CMD) on Windows,run opencode 2. Start OpenCode TUI 3. While the TUI is running, resize the CMD window (drag to change width or height),The application crashes immediately. ### Screenshot and/or share link _No response_ ### Operating System Windows 10 ### Terminal Windows terminal(CMD)
yindo added the windowsopentuibug labels 2026-02-16 17:45:36 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 12, 2026):

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

  • #631: Windows Support (umbrella issue tracking all Windows-related problems)
  • #3328: opentui: tui not resizing when window resizes (similar terminal resize handling issue on Windows/Wezterm)
  • #3676: Change window size doesn't work in 1.0.7 + windows terminals (Windows-specific resize issue affecting multiple terminals)
  • #4829: Select popup with commands doesn't reposition on terminal resize (terminal resize event handling)
  • #5070: bug: exiting tui on windows has improper exit sequence handling (Windows-specific TUI exit/stability issues)
  • #7539: Broken TUI on 1.1.10 on windows terminal with git bash (recent Windows TUI crash regression)

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

@github-actions[bot] commented on GitHub (Jan 12, 2026): This issue might be a duplicate of existing issues. Please check: - #631: Windows Support (umbrella issue tracking all Windows-related problems) - #3328: opentui: tui not resizing when window resizes (similar terminal resize handling issue on Windows/Wezterm) - #3676: Change window size doesn't work in 1.0.7 + windows terminals (Windows-specific resize issue affecting multiple terminals) - #4829: Select popup with commands doesn't reposition on terminal resize (terminal resize event handling) - #5070: bug: exiting tui on windows has improper exit sequence handling (Windows-specific TUI exit/stability issues) - #7539: Broken TUI on 1.1.10 on windows terminal with git bash (recent Windows TUI crash regression) Feel free to ignore if none of these address your specific case.
Author
Owner

@kommander commented on GitHub (Jan 13, 2026):

Does it work vanilla, without OmO?

@kommander commented on GitHub (Jan 13, 2026): Does it work vanilla, without OmO?
Author
Owner

@CodeNewbie88 commented on GitHub (Jan 13, 2026):

Does it work vanilla, without OmO?在不使用 OmO 的原生环境下,它可以正常工作吗?

It cannot work properly; this issue already existed before I installed OmO.

@CodeNewbie88 commented on GitHub (Jan 13, 2026): > Does it work vanilla, without OmO?在不使用 OmO 的原生环境下,它可以正常工作吗? It cannot work properly; this issue already existed before I installed OmO.
Author
Owner

@lemonlambda commented on GitHub (Jan 15, 2026):

This happens to me. I'm on linux using kitty terminal though.

It only happens sometimes though when I'm resizing too fast.

@lemonlambda commented on GitHub (Jan 15, 2026): This happens to me. I'm on linux using kitty terminal though. It only happens sometimes though when I'm resizing too fast.
Author
Owner

@missaved commented on GitHub (Jan 21, 2026):

环境补充:Windows(管理员权限)。
终端:CMD 和 PowerShell 都会复现。
行为:TUI 运行中调整窗口大小会立即崩溃。
版本:1.1.27。

@missaved commented on GitHub (Jan 21, 2026): 环境补充:Windows(管理员权限)。 终端:CMD 和 PowerShell 都会复现。 行为:TUI 运行中调整窗口大小会立即崩溃。 版本:1.1.27。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4827