On WSL with interop disabled, fullscreen copy depends on the terminal's OSC 52 support and ignores the working WSLg clipboard

Status Open
Reported on v2.1.293
Maintainer reply None cached
Activity 0 comments · opened Oct 11, 2026

Environment

  • Claude Code 2.1.293, "tui": "fullscreen", Copy on select on
  • WSL2, Ubuntu 24.04.5, kernel 6.18.33.2-microsoft-standard-WSL2, WSLg running (DISPLAY=:0, WAYLAND_DISPLAY=wayland-0)
  • /etc/wsl.conf: [interop] enabled=false, appendWindowsPath=false, [automount] enabled=false, so powershell.exe and clip.exe are not available
  • wl-clipboard 2.2.1 and xclip 0.13 installed
  • Terminals: Windows Terminal, and the IntelliJ IDEA 2026.2 terminal (JediTerm, which doesn't support OSC 52)

What happens
Whether a fullscreen-mode selection (copy on select, or Ctrl+C) reaches the Windows clipboard depends on the terminal:

| Terminal | Claude Code | Codex CLI 0.161.0 |
| :- | :- | :- |
| Windows Terminal | works | works |
| IntelliJ IDEA terminal | fails | works |

The results are the same with and without the herdr multiplexer in between.

Expected
Copying works in the IntelliJ terminal too. WSLg syncs its X11/Wayland clipboard with Windows, so the native Linux tools already work on this machine regardless of the terminal:

printf 'x11-clipboard-test' | xclip -selection clipboard -in
# Ctrl+V in a Windows app pastes "x11-clipboard-test"

That is how Codex succeeds everywhere: it writes to the X11/Wayland clipboard through arboard.

Likely cause
According to the docs (Fullscreen rendering → Keep native text selection), on WSL Claude Code copies through PowerShell Set-Clipboard. With interop disabled, which is a common hardening setting, that path is unavailable. Since copying still works in Windows Terminal, Claude Code apparently falls back to OSC 52, which fails in terminals without OSC 52 support. It never tries wl-copy/xclip/xsel, which it already uses on Linux and which work under WSLg.

Suggestion
On WSL, when powershell.exe isn't reachable, try the Linux clipboard tools whenever WAYLAND_DISPLAY or DISPLAY is set, in addition to OSC 52 or before it.

Related

  • #82909: the same root cause for paste (WSL routes clipboard access to powershell.exe, and the Linux-tools fallback is unreachable when interop is disabled). It was closed as stale without a fix; this issue is the copy side of it.
  • #94668: drag-select copy silently failing on WSL2 in the VS Code terminal. That report has interop enabled and no Linux clipboard tools installed, so the cause is different.
  • #81472: the copy/paste tracking issue.

View original on GitHub ↗