Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Copying text that an app in the integrated terminal places on the clipboard via OSC 52 (e.g. Claude Code’s TUI mouse selection) corrupts all multi-byte UTF-8: Chinese/Cyrillic/emoji become Latin-1 mojibake (e.g. 要 → è¦), while ASCII in the same selection is preserved.
Root cause: @xterm/[email protected] decodes the OSC 52 base64 payload with bare atob() and writes the resulting Latin-1 binary string to the clipboard without a UTF-8 decode. This regression shipped in VS Code 1.123/1.124 and was fixed upstream:
- xtermjs/xterm.js#6002
- microsoft/vscode#320646 (released in VS Code 1.125)
Repro:
- Cursor 3.12.30 (macOS arm64) → Remote-SSH to a Linux host (also reproduces inside tmux).
- Run any app that copies via OSC 52 — e.g. Claude Code, select non-ASCII text in its TUI with the mouse.
- Paste: multi-byte characters are mojibake, ASCII is intact.
Cross-check that isolates this to Cursor: official VS Code 1.130.0 connected to the same host over Remote-SSH copies the same text correctly.
Cursor’s About panel reports the identical xterm.js: 6.1.0-beta.256 across several recent releases (3.11.x → 3.12.30), which suggests the terminal stack (including @xterm/addon-clipboard) is pinned and hasn’t absorbed the upstream fix despite the VS Code API 1.128 rebase.
Ask: please bump the bundled @xterm/addon-clipboard to a version containing the xterm.js#6002 fix.
Also tracked from the app side at anthropics/claude-code#66098 (labeled external there, since the sender encodes correctly).
Environment:
- Cursor 3.12.30 (Universal), commit 63a2996a10d9e476b6c28e951dd7691d9c0cf480, macOS Darwin arm64 25.5.0
- Remote-SSH to Linux (Ubuntu, tmux 3.x), reproduces with and without tmux
- xterm.js: 6.1.0-beta.256, Electron 40.10.3
Steps to Reproduce
- Cursor 3.12.30 (macOS arm64) → Remote-SSH to a Linux host (also reproduces inside tmux).
- Run any app that copies via OSC 52 — e.g. Claude Code, select non-ASCII text in its TUI with the mouse.
- Paste: multi-byte characters are mojibake, ASCII is intact.
Operating System
MacOS
Version Information
- Cursor 3.12.30 (Universal), commit 63a2996a10d9e476b6c28e951dd7691d9c0cf480, macOS Darwin arm64 25.5.0
- Remote-SSH to Linux (Ubuntu, tmux 3.x), reproduces with and without tmux
- xterm.js: 6.1.0-beta.256, Electron 40.10.3
Does this stop you from using Cursor
No - Cursor works, but with this issue