You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Mouse wheel dead in the TUI inside the VS Code integrated terminal since 1.105, root cause is xterm not opencode #42501
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.
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
VS Code 1.105 or later on Windows, open the integrated terminal
Start opencode (TUI)
Hover the list and scroll the mouse wheel
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
The issue does not use one of the required issue templates (Bug Report, Feature Request, or Question). Please resubmit using the Bug Report template, which requires a Description field with content about the bug.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of or related to existing issues. Please check:
Thanks for updating the issue to follow the Bug Report template! The issue now meets our contributing guidelines and the compliance flag has been removed. We appreciate the thorough investigation and upstream references.
One more thing that makes this fix necessary in practice: my company's intranet only provides older VS Code builds (upgrades are controlled by IT/security policy), and this bug affects every version from 1.105 onward, including those. So anyone stuck on an older VS Code in a locked-down environment has no way to get around the dead wheel in the TUI, no matter how many updates are released upstream. A fix in xterm is the only way it reaches these setups.
The xterm.js fix PR link above (#6104) died together with its head fork — it has been resubmitted as xtermjs/xterm.js#6118. Also reported directly to VS Code since the bundled xterm affects all integrated terminal users on 1.105+: microsoft/vscode#331756.
Status update: the upstream fix (xtermjs/xterm.js#6118) has been open for ~8 weeks without a review; a polite ping to the maintainers two weeks ago has also gone unanswered, and microsoft/vscode#331756 has been quiet as well.
Since this is directly user-facing for opencode — every user on VS Code 1.105+ running a TUI in the integrated terminal has a dead mouse wheel — would the team be willing to leave a brief +1 or endorsement on the upstream PR? A signal from opencode carries much more weight with the xterm.js maintainers than the author pinging alone.
The fix is fully verified (byte-level A/B across VS Code 1.104 / 1.105 / 1.128, 4 new unit tests, full suite green), and I'm happy to provide additional data if useful.
Thanks for tracing this to xterm.js in VS Code's integrated terminal: the affected wheel events are dropped before OpenCode receives them. Closing this as an upstream terminal issue; please follow xtermjs/xterm.js#6105 for updates.
Thanks for confirming the upstream attribution! For anyone following along: the fix is ready for review at xtermjs/xterm.js#6118 (byte-level A/B verification across VS Code 1.104/1.105/1.128, 4 new unit tests, full suite green). Once it lands and VS Code bundles the new xterm, the dead wheel in opencode's TUI resolves with no change needed on the opencode side.
Activity
github-actions commentedon Aug 14, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of or related to existing issues. Please check:
mouse: falseconfig — similar scroll/wheel issues in the TUIIf you believe this was flagged incorrectly, please let a maintainer know.
Xukun-Liu commentedon Aug 14, 2026
Updated the body to follow the Bug Report template (added a Description section). Requesting re-check of the compliance label.
github-actions commentedon Aug 14, 2026
Thanks for updating the issue to follow the Bug Report template! The issue now meets our contributing guidelines and the compliance flag has been removed. We appreciate the thorough investigation and upstream references.
Xukun-Liu commentedon Aug 14, 2026
One more thing that makes this fix necessary in practice: my company's intranet only provides older VS Code builds (upgrades are controlled by IT/security policy), and this bug affects every version from 1.105 onward, including those. So anyone stuck on an older VS Code in a locked-down environment has no way to get around the dead wheel in the TUI, no matter how many updates are released upstream. A fix in xterm is the only way it reaches these setups.
Xukun-Liu commentedon Aug 20, 2026
The xterm.js fix PR link above (#6104) died together with its head fork — it has been resubmitted as xtermjs/xterm.js#6118. Also reported directly to VS Code since the bundled xterm affects all integrated terminal users on 1.105+: microsoft/vscode#331756.
Xukun-Liu commentedon Oct 14, 2026
Status update: the upstream fix (xtermjs/xterm.js#6118) has been open for ~8 weeks without a review; a polite ping to the maintainers two weeks ago has also gone unanswered, and microsoft/vscode#331756 has been quiet as well.
Since this is directly user-facing for opencode — every user on VS Code 1.105+ running a TUI in the integrated terminal has a dead mouse wheel — would the team be willing to leave a brief +1 or endorsement on the upstream PR? A signal from opencode carries much more weight with the xterm.js maintainers than the author pinging alone.
The fix is fully verified (byte-level A/B across VS Code 1.104 / 1.105 / 1.128, 4 new unit tests, full suite green), and I'm happy to provide additional data if useful.
neriousy commentedon Oct 20, 2026
Thanks for tracing this to xterm.js in VS Code's integrated terminal: the affected wheel events are dropped before OpenCode receives them. Closing this as an upstream terminal issue; please follow xtermjs/xterm.js#6105 for updates.
Xukun-Liu commentedon Oct 20, 2026
Thanks for confirming the upstream attribution! For anyone following along: the fix is ready for review at xtermjs/xterm.js#6118 (byte-level A/B verification across VS Code 1.104/1.105/1.128, 4 new unit tests, full suite green). Once it lands and VS Code bundles the new xterm, the dead wheel in opencode's TUI resolves with no change needed on the opencode side.