Skip to content

Linux/Ubuntu 25.10 VM: stray mouse escape sequences remain in terminal after exiting TUI #20207

Closed as not planned

Description

@timrichardson

Description

On Ubuntu 25.10 running inside a VM, exiting the OpenCode TUI often leaves the terminal in a bad state. After exit, mouse movement or scrolling prints raw stray character codes into the shell prompt.

A representative example is:

35;16;107M

This appears to be the tail of a leaked SGR mouse-report sequence rather than normal shell input.

The visible symptoms are nearly identical to #11748, but this report is for Linux/Ubuntu 25.10 in a VM rather than Windows/PowerShell.

Plugins

No Plugin

OpenCode version

1.3.9

Steps to reproduce

  1. Run opencode on Ubuntu 25.10 inside a VM
  2. Use the TUI normally
  3. Exit the TUI
  4. Move the mouse or scroll in the terminal
  5. Stray character codes appear in the shell prompt

Expected behavior

After exit, the terminal should return to a normal shell state with no raw mouse or escape-sequence output.

Actual behavior

After exit, mouse movement or scrolling can inject stray codes into the shell prompt, such as 35;16;107M.

Screenshot and/or share link

No response

Operating System

Ubuntu 25.10 (guest VM)

Terminal

Linux terminal in a VM (symptoms nearly identical to #11748, but not on Windows/PowerShell)

Activity

  1. timrichardson commented on Mar 31, 2026

    @timrichardson
    SponsorAuthor

    Draft fix proposed in #20199.

  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 31, 2026
  3. github-actions commented on Mar 31, 2026

    @github-actions
    Contributor

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

    These all appear to be the same underlying issue: the TUI does not properly disable mouse tracking on exit. Your report is the Linux/Ubuntu VM variant of the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions