[BUG] Mouse drag-select copy silently fails on WSL2 in the VS Code integrated terminal: highlight shows, no clipboard write, no notice (2.1.273; Windows native works)
Preflight Checklist
- [x] I have searched existing issues. Closest are #71826 (mouse capture breaks native selection), #84184 (drag-release copy silently fails on Wayland without a clipboard backend) and the meta tracker #81472. None covers WSL2 under the VS Code integrated terminal.
- [x] This is a single bug report.
- [x] I am using the latest version of Claude Code (2.1.273).
What's Wrong?
With the default tui renderer in the VS Code integrated terminal over Remote-WSL, Claude Code captures the mouse and handles drag-selection itself. The selection highlights, but on release nothing reaches the Windows clipboard, no "Copied to clipboard" notice appears, and no error is shown. Pasting anywhere yields the clipboard's previous content.
The same build running natively on Windows in the same VS Code (non-remote window) copies correctly and shows the "Copied N characters" notice. So the silent failure is specific to the WSL2 clipboard path.
Environment
- Claude Code 2.1.273, native installer (
~/.local/bin/claude),tui: "default" - WSL2 Ubuntu, kernel 6.6.114.1-microsoft-standard-WSL2, WSLg present (
DISPLAY=:0,WAYLAND_DISPLAY=wayland-0) - Windows 11, VS Code 1.137.0 Remote-WSL, extension
anthropic.claude-code2.1.273 clip.exeandpowershell.exeare on PATH inside WSL. Noxclip,xselorwl-copyinstalled.- No tmux or other multiplexer.
Steps to reproduce
- In VS Code (Remote-WSL window), open the integrated terminal and start
claude. - Ask anything so a response renders.
- Drag-select part of the response with the mouse and release.
- Paste into any editor.
Expected: selected text is on the Windows clipboard, and the "Copied N characters" notice appears, as on Windows native.
Actual: highlight appears, nothing is copied, no notice, no error.
Workaround
Hand the drag back to VS Code:
~/.claude/settings.json:"env": { "CLAUDE_CODE_DISABLE_MOUSE": "1" }- VS Code user settings:
"terminal.integrated.copyOnSelection": true
Drag then copies on release in both the WSL and Windows windows. The trade-off is that Claude Code's own selection features and its notice are gone.
Notes
- Possibly the same silent-backend behaviour as #84184 (Wayland without wl-clipboard) but on the WSL branch of the clipboard code, where the Windows tools are present and reachable. I did not capture which command the copy path runs on WSL, so I cannot say whether it is skipped, fails, or writes to a different clipboard.
- The absence of the notice suggests the copy handler does not complete, rather than completing with a bad payload.