Skip to content

Windows Command Prompt Mouse/Scroll Events Misbehave After Exiting "opencode" #12434

Closed

Description

@Vishal-080

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

  1. Open Windows Command Prompt (cmd.exe)

  2. Navigate to any directory (optional)

  3. Run opencode

  4. Use opencode normally for a short time

  5. Exit or close opencode (for example, using its exit command or "ctrl+c" or closing the session)

  6. 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

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Feb 6, 2026
  2. github-actions commented on Feb 6, 2026

    @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.

  3. Hona commented on Feb 12, 2026

    @Hona
    Member

    this is fixed as of 1.1.60

  4. slweston commented on Apr 17, 2026

    @slweston

    I'm on version 1.4.9, and it is still an issue on Windows. This happens even when using /exit.

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 opentuiwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions