Windows Command Prompt Mouse/Scroll Events Misbehave After Exiting "opencode" #12434
Description
Description
While using opencode from the Windows Command Prompt (cmd.exe), the terminal starts behaving incorrectly after opencode is closed or exited.
Once the opencode process terminates, the Command Prompt does not properly restore its original input state. As a result, mouse-related interactions become unstable, including:
Mouse scrolling behaves erratically or stops working correctly
Mouse movement triggers unexpected behavior
Cursor positioning becomes inconsistent when interacting with the terminal
This issue persists for the current Command Prompt session and typically requires closing and reopening the terminal to restore normal behavior.
The problem appears to be related to opencode not fully resetting the terminal/console state on exit, particularly around mouse or input handling on Windows.
Plugins
oh-my-opencode
OpenCode version
No response
Steps to reproduce
-
Open Windows Command Prompt (cmd.exe)
-
Navigate to any directory (optional)
-
Run opencode
-
Use opencode normally for a short time
-
Exit or close opencode (for example, using its exit command or "ctrl+c" or closing the session)
-
After returning to the Command Prompt, try the following:
6.1. Scroll using the mouse wheel
6.2. Move the mouse cursor over the terminal
6.3. Click inside the terminal window
Screenshot and/or share link
No response
Operating System
windows-10
Terminal
command prompt (windows)
Activity
github-actions commentedon Feb 6, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
Hona commentedon Feb 12, 2026
this is fixed as of 1.1.60
slweston commentedon Apr 17, 2026
I'm on version 1.4.9, and it is still an issue on Windows. This happens even when using /exit.