[BUG] Text copied from Claude Code TUI doesn't cross RDP clipboard redirection; pasting into Notepad first is required

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 2 comments · opened Jul 25, 2026

Environment

  • Claude Code: 2.1.220 (issue began when the mouse-enabled TUI rolled out)
  • Server: Windows Server 2025 Standard (10.0.26100), Windows Terminal, PowerShell
  • Client: Windows laptop connected via Remote Desktop (mstsc) with clipboard redirection enabled

Description

Since the "mouse enabled" version of the Claude Code TUI, text copied from Claude Code running in Windows Terminal on an RDP server no longer reaches the clipboard of the RDP client machine. Pasting on the laptop yields nothing (or stale content from an earlier copy).

The copy does succeed locally on the server: pasting into Notepad on the server works. Re-copying that same text from Notepad then propagates to the laptop normally. So the round-trip workaround is: copy in Claude Code → paste into server-side Notepad → re-copy → paste on laptop.

Expected behavior

Text copied from the Claude Code TUI should behave like any other clipboard content and be picked up by RDP clipboard redirection (rdpclip), the same way a copy from Notepad or Windows Terminal's native selection is.

Suspected cause

The symptom pattern (works locally, invisible to rdpclip, fixed by laundering through Notepad; at times associated with a still-running Claude Code instance holding clipboard ownership) suggests Claude Code is placing the text on the clipboard via OLE with delayed rendering, or holding clipboard ownership in a way rdpclip cannot serialize for redirection. A plain immediate CF_UNICODETEXT set (which is what Notepad produces) redirects fine.

Steps to reproduce

  1. RDP from a Windows laptop into a Windows server with clipboard redirection enabled.
  2. On the server, run Claude Code 2.1.220 in Windows Terminal (mouse mode active).
  3. Select and copy text from the Claude Code TUI.
  4. On the laptop, try to paste → nothing / stale content.
  5. On the server, paste into Notepad (works), copy from Notepad, paste on the laptop → works.

What was ruled out

  • Restarting rdpclip.exe on the server and reconnecting the RDP session: no change.
  • Extensive general clipboard troubleshooting (assumed "bad clipboard"): no change. The failure is specific to copies originating from the Claude Code TUI.

Related issues

  • #72617 (copy from TUI doesn't reach system clipboard on Windows 10 — local-only variant of this)
  • #66056 (mouse reporting capturing right-click since ~2.1.167)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗