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] Set-Clipboard leaves ownerless OLE object, stalling RDP clipboard #101676
Bug Description
Remote Desktop Clipboard bug: Claude Code's clipboard write via PowerShell's Set-Clipboard leaves an ownerless OLE object once the process exits, which stalls rdpclip since the owner's gone, other tools like Firefox/cmd write plain text and work fine, so RDP itself was never the issue.
Issue only happens while using claude code, it pastes nothing on the machine that launched the rdp session. Yet codex copy and paste works, browser copy and paste works, terminal/command prompt copy and paste all works via RDP except claude code. Wasted over 10% of my weekly quota to diagnose this silly bug.
Same bug here from the other direction: Claude Code 2.1.312 runs locally (Windows 11, Windows
Terminal 1.25), and text copied from it pastes empty inside an mstsc session. I narrowed it down
with a few scripts in plain Windows Terminal, pasting into Notepad in the RDP session each time:
Clipboard written by
RDP paste
Windows PowerShell 5.1 Set-Clipboard alone, including the exact text Claude had copied
ok
two pwsh 7 Set-Clipboard calls back to back
ok
OSC 52 alone (Windows Terminal writes the clipboard)
ok
OSC 52, then Windows PowerShell 5.1 Set-Clipboard straight after
empty
So the OLE object on its own doesn't break RDP for me; the combination does. Claude's copy leaves
the same clipboard formats as Windows PowerShell 5.1's Set-Clipboard (DataObject, Ole Private Data, plus text), so it looks like Claude Code sends OSC 52 and also runs powershell.exe Set-Clipboard, and rdpclip loses the second write.
Activity
pablo-munoz-volue commentedon Oct 28, 2026
Same bug here from the other direction: Claude Code 2.1.312 runs locally (Windows 11, Windows
Terminal 1.25), and text copied from it pastes empty inside an mstsc session. I narrowed it down
with a few scripts in plain Windows Terminal, pasting into Notepad in the RDP session each time:
Set-Clipboardalone, including the exact text Claude had copiedSet-Clipboardcalls back to backSet-Clipboardstraight afterSo the OLE object on its own doesn't break RDP for me; the combination does. Claude's copy leaves
the same clipboard formats as Windows PowerShell 5.1's
Set-Clipboard(DataObject,Ole Private Data, plus text), so it looks like Claude Code sends OSC 52 and also runspowershell.exe Set-Clipboard, and rdpclip loses the second write.Repro of the failing case: