Skip to content

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

@timrichardson

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)

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions