[BUG] OSC 52 + MobaXterm issue
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Terminal: MobaXterm (latest version, WSL local tab — not SSH)
Claude Code: 2.1.146
Symptom: OSC 52 clipboard not supported — "sent N chars via OSC 52" message appears but nothing reaches Windows clipboard; highlight-to-copy and right-click paste both broken inside Claude Code session
Workaround: Shift+Insert works for 'paste'
Copy/Paste was still working last week.
What Should Happen?
highlight to copy and right click to paste should work in MobaXterm
Error Messages/Logs
Steps to Reproduce
In MobaXterm (WSL, Ubuntu 22)
Open Claude Code
Try highlighting text to copy → test paste somewhere >> not working
Try right-click to paste something in >> not working
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.146
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
MobaXterm (WSL, Ubuntu 22)
Showing cached comments. Read the full discussion on GitHub ↗
5 Comments
I am seeing the same behaviour, only with "/tui fullscreen" enabled in Claude Code.
Holding shift uses MobaXterm's copy behaviour, bypassing Claude Code, this appears to work normally.
This might be an issue with MobaXterm handling of OSC 52, rather than with Claude Code itself. Disabling "copy on select" at least prevents CC from trying to send the sequence, although shift is still required to use MobaXterm copy behaviour.
I have the same issue, which seems to have started yesterday. Very annoying.
Same on warp terminal. Have to hold shift and then select & copy
Another workaround is to launch Claude Code CLI like this:
This allows fullscreen TUI but doesn't give Claude the mouse, so all terminal mouse actions work as before. Of course you also can't click to expand, you have to use the old ctrl-O method (which is still available in fullscreen).
And another workaround is to press
ctrl + Oand then '[', which will put claude's history into your terminal's scrollback buffer, and also bypass Claude's mouse control, until you pressescorqto exit the mode. Bit of a hassle though, and may push data off-screen when it expands things out.Adding "tui": "default" to ~/.claude/settings.json fixes the issue.