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
WSL: clipboard write via clip.exe fails (quoted path in cmd /c), mouse selection copies nothing #5271
Version: 1.0.105 (also seen on 1.0.104) Environment: WSL2 (Ubuntu 26.04) + WSLg, GNOME Console (VTE, no OSC 52 support)
Problem
Selecting text with the mouse and copying leaves the clipboard empty. /copy works.
Logs writeToClipboard: clip.exe failed; relied on OSC 52: Error: clip.exe exited with code 1
Root cause
On WSL the CLI spawns cmd.exe /d /c 'chcp 65001 >nul & "<path>\clip.exe"'. The quotes around the path get escaped when launched from WSL, and cmd reports: '\"C:\Windows\System32\clip.exe\"' is not recognized as an internal or external command
so it exits with code 1. The CLI then falls back to OSC 52, which VTE terminals ignore, so nothing reaches the clipboard.
Verification
Running the same command without the quotes around the clip.exe path exits 0 and the text lands on the Windows clipboard.
Workaround
Remove the quotes around ${n} in the chcp 65001 >nul & "${n}" template in cli-main.js.
Suggested fix
Don't quote the path (or escape it correctly for WSL interop), or invoke clip.exe directly instead of via cmd /c.
Activity