Aident AI

Claude Code Copy/Paste Broken? Fix Fullscreen, SSH, and tmux
If Claude Code will not copy selected text, start by running /tui. When it reports fullscreen, the app owns mouse selection instead of your terminal. Try Claude Code's in-app copy first, use your terminal's native-selection modifier for a one-off copy, or run /tui default when you need normal terminal scrollback. Over SSH and tmux, also verify the clipboard transport instead of repeatedly changing keyboard shortcuts.
The right fix depends on where the copy failed. Claude Code's current fullscreen renderer can select text inside the app, send it through a local clipboard command, write it to tmux, or transmit it over SSH with OSC 52. Those paths look identical on screen but fail for different reasons.
Match the Symptom to the Boundary
Symptom | Likely boundary | First check |
|---|---|---|
Text highlights and a copy toast appears, but paste is empty | Clipboard command or OSC 52 transport | Read the toast, then test terminal clipboard permission |
Click-drag does not create native terminal selection | Fullscreen mouse capture | Hold the terminal's native-selection modifier |
Copied text contains hard wraps, gutters, or padding | Rendered terminal text | Use |
tmux copy mode cannot see earlier output | Alternate screen buffer | Open transcript mode and write it to scrollback |
Copy works locally but fails over SSH | Remote OSC 52 support | Test native selection or write the answer to a file |
A large paste loses characters in VS Code | Integrated-terminal input limit | Put the content in a file and ask Claude to read it |
Do not change every terminal setting at once. A single controlled test makes the responsible boundary visible.
Prerequisites
Record the environment before changing it:
Inside Claude Code, run:
Expected result: you have the Claude Code version, terminal type, tmux state, and active renderer. Update Claude Code through its supported updater before diagnosing a bug already fixed in a newer release.
Keep a harmless test string ready:
Paste it into a plain-text editor after each step. The Korean characters make silent encoding damage visible without using sensitive data.
Step 1: Test Fullscreen's Built-In Copy Path
In fullscreen mode, click and drag across the test string. Claude Code should copy the selection when you release the mouse and show a toast describing the path it used.
Open /config and confirm Copy on select is enabled. If you prefer manual copy, turn it off, select text, and press Ctrl+Shift+C. Terminals that support the kitty keyboard protocol can also expose Cmd+C, and Ctrl+C copies when a selection is already active.
Expected result: the plain-text editor receives copy-check-한글-123 exactly once, with no changed characters. If the toast appears but the clipboard stays empty, selection worked and the failure is downstream.
For a complete response, avoid rendered selection entirely:
/copy copies the last assistant response as raw Markdown and lets you choose an individual code block or the full response. Press w in its picker to write the selection to a file, which is useful when a remote clipboard is unreliable.
Step 2: Force Native Terminal Selection Once
Fullscreen mouse capture prevents ordinary terminal click-drag selection. Hold the modifier for your terminal while selecting:
Terminal | Native-selection modifier |
|---|---|
Apple Terminal |
|
iTerm2 |
|
VS Code, Cursor, or Devin Desktop |
|
Most other terminals |
|
Then use the terminal's normal copy shortcut.
Expected result: the terminal, not Claude Code, owns the selection. If this works, the text and operating-system clipboard are healthy. The problem is limited to mouse capture or Claude Code's clipboard transport.
If you always want native selection but still want fullscreen's stable rendering, launch one diagnostic session with mouse capture disabled:
Keyboard scrolling still works, but mouse-wheel scrolling, clickable links, and click-to-expand are unavailable. Use this as a deliberate tradeoff, not a mystery environment variable copied into every shell profile.
Step 3: Diagnose SSH and OSC 52
Over SSH, Claude Code cannot run the clipboard program on your local laptop. It sends an OSC 52 escape sequence and depends on the local terminal to accept it.
For iTerm2, run Claude Code's setup command in the host terminal, outside tmux or screen:
You can also verify iTerm2's Applications in terminal may access clipboard setting. Then reconnect over SSH and repeat the harmless copy test.
Expected result: Claude Code's toast reports the remote copy path and the exact UTF-8 test string reaches the local clipboard. If your terminal blocks OSC 52 by policy, keep that policy and use native selection or /copy followed by w. Do not weaken a managed terminal configuration just to make one shortcut work.
Step 4: Give tmux the Right Content
Fullscreen conversations live in an alternate screen buffer, so tmux copy mode cannot see the transcript by default. Enter transcript mode with Ctrl+O, then press [ to write the full conversation into native terminal scrollback. tmux can now search and select it normally.
To open the transcript as a temporary file instead, enter transcript mode and press v.
For fullscreen mouse-wheel support in regular tmux, add this to ~/.tmux.conf:
Reload the exact file:
Expected result: the mouse wheel reaches Claude Code, while Ctrl+O then [ gives tmux a normal scrollback copy path. Do not use fullscreen rendering inside iTerm2's tmux -CC integration mode. Anthropic documents that combination as incompatible; use regular tmux or the classic renderer.
Step 5: Return to the Classic Renderer
When native scrollback and terminal-owned selection matter more than fullscreen behavior, switch back inside Claude Code:
Expected result: the conversation relaunches in the classic renderer, and new output returns to the terminal's normal scrollback. If an environment variable forces fullscreen, remove it from the diagnostic session before concluding that /tui default failed.
This is also the cleanest control test. If copy works in the classic renderer and fails only in fullscreen, you have isolated the renderer boundary without deleting settings, sessions, or credentials.
Step 6: Stop Pasting Large Logs
Claude Code collapses large pasted input visually, but the VS Code integrated terminal can drop characters before Claude Code receives them. For large logs or files, save the data and provide the path:
Then ask Claude Code:
Expected result: Claude reads the original bytes from disk, the transcript stays short, and no clipboard renderer can insert wrapping or padding. If the file contains secrets, redact it before giving any model access.
Common Failure Modes
Failure | What it means | Next action |
|---|---|---|
Selection toast says copied, paste is empty | Selection succeeded; clipboard transport failed | Check OSC 52 or terminal clipboard permission |
Native modifier works, in-app copy does not | Terminal clipboard is healthy | Use |
ASCII works but | Encoding path is corrupting UTF-8 | Use file output and report version, terminal, SSH, and tmux details |
| Transcript was only in the alternate buffer | Keep that workflow or use |
Only giant pastes are incomplete | Input was lost before Claude Code parsed it | Use a file path instead of the clipboard |
Copy breaks across every application | System clipboard state may be involved | Exit the exact Claude session, retest another app, and avoid broad process killing |
Why These Fixes Work
The screen, selection, and clipboard are separate layers. Fullscreen mode draws a virtualized transcript and captures mouse events. Claude Code then transports selected bytes through a platform clipboard tool, tmux buffer, or OSC 52. The classic renderer instead leaves text in terminal scrollback.
Testing one layer at a time tells you whether the content was rendered incorrectly, selected incorrectly, or transported incorrectly. That is safer and faster than reinstalling Claude Code or deleting configuration.
The same principle applies to integration work. If you repeatedly copy issue text, tickets, or messages between a browser and an agent, connect the source so the agent can retrieve the exact record with a bounded read-only Action. For related remote-terminal setup, see Run Codex Remotely From Your Phone With Tailscale and tmux. For OAuth URLs that fail in containers or remote clients, use How to Fix MCP OAuth Callback Errors in Docker, WSL, and Remote Clients. For large agent logs, see Claude Code JSONL Logs: Measure Token Usage Safely.
Replace One Copy/Paste Round Trip
Set up Aident Loadout in your agent by pasting:
Then ask:
Expected result: ten current issue records, zero provider writes, and no manual copying of issue bodies or access tokens. That is the measurable CTA.
Sources
Fullscreen rendering, Anthropic Claude Code documentation, accessed August 1, 2026
Configure your terminal for Claude Code, Anthropic Claude Code documentation, accessed August 1, 2026
Claude Code commands, Anthropic Claude Code documentation, accessed August 1, 2026
Claude Code changelog, Anthropic, accessed August 1, 2026
Copy/paste is broken across all surfaces, tracking issue opened July 26, 2026
CLI login cannot paste the browser code with bracketed paste, issue opened April 13, 2026
Claude Code copy/paste broken over SSH, community reproduction accessed August 1, 2026
Issues with Copy & Paste Claude Code - Mac Terminal, community discussion accessed August 1, 2026
Refresh this guide when Anthropic closes the July 26 tracking issue, changes fullscreen clipboard transport, or updates the documented SSH and tmux behavior.


