anomalyco / anomalyco/opencode

[Bug] Mouse wheel dead in the TUI inside the VS Code integrated terminal since 1.105, root cause is xterm not opencode

Open
#42,501 5 comments 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

The mouse wheel is dead in the TUI inside the VS Code integrated terminal. Arrow keys work, but scrolling the wheel does nothing. This started with VS Code 1.105.

The root cause is not opencode. The wheel events are silently swallowed by xterm.js, the terminal emulator bundled in VS Code, in the alt buffer. The regression was introduced in xterm 5.6.0-beta.119. I verified this with byte-level A/B testing between VS Code 1.104 (beta.118) and 1.105 (beta.119): a raw-mode pty listener plus CDP-injected wheel events. Pixel deltas under roughly 50px produce zero bytes on the pty, so the app never sees them. This affects trackpads, smooth wheels and low-sensitivity mice; fast-scrolling mice can pass the threshold, which is why it is so easy to miss.

Analysis and fix already submitted upstream:

Opening this here so opencode users hitting it in VS Code have a searchable reference, and a place to pick up the fix once VS Code ships a newer xterm.

Plugins

None

OpenCode version

Latest (dev build), run inside the VS Code integrated terminal

Steps to reproduce
  1. VS Code 1.105 or later on Windows, open the integrated terminal
  2. Start opencode (TUI)
  3. Hover the list and scroll the mouse wheel
  4. Trackpad / smooth wheel / low-sensitivity mouse: scroll does nothing
Screenshot and/or share link

Not applicable, see byte-level evidence in the linked xterm.js issue

Operating System

Windows 11

Terminal

VS Code integrated terminal (bundled xterm)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.