OmniscioGuidesClaude Code copy and paste
Claude Code copy and paste not working: the keys, the switches, and what is still open
Claude Code does not own your clipboard. Your terminal does, and the renderer decides what a mouse drag can see, which is why the same complaint has a different cause on Windows Terminal, in iTerm2 and over SSH. This page gives the documented key for pasting an image and the platforms where the documentation names none, the documentation's own account of what happens to pasted text, the settings that change the behaviour, and the reports from Anthropic's tracker that were open the day it was read.
Checked against Claude Code 2.1.310 documentation, read on October 26, 2026. No paste or copy on this page was performed on a machine of ours. By the Omniscio team. Updated .
Which of these is happening?
Four different faults get reported under the same search. Pick the one that matches your screen, because the fixes do not overlap.
- Text will not go into the prompt, or it arrives as a placeholder, or only part of it arrives.
- An image will not go in, or a chip appears and Claude never sees the picture.
- Copied text comes out wrapped, indented or padded, and you clean it by hand before pasting it somewhere else.
- Copied text never reaches the clipboard, or the selection cannot be made at all.
One thing this page leaves out on purpose: if the screen flickers, jumps or scrolls on its own while Claude works, that is the renderer's drawing rather than the clipboard, and the guide on rendering will own it once that guide is written.
Pasting text into the prompt
Anthropic documents no key of its own for pasting text, so the text reaches the prompt through your terminal. What the documentation describes is what the input then does with it. A paste of more than 800 characters or more than three lines collapses to a placeholder such as [Pasted text #1 +120 lines], so the input box stays usable, and the full content is still sent when you submit. Claude is told which parts of a prompt were pasted rather than typed, and that a paste can contain instructions you did not write, so it follows instructions inside a paste only where your own message asks it to.
The content behind each placeholder is kept under ~/.claude/paste-cache/. That is why recalling a prompt from history and resubmitting it sends the full pasted text again, even in a later session. Cache files older than cleanupPeriodDays are swept, and when a recalled prompt points at a paste that is gone, the literal placeholder is never sent. A plain prompt loses the placeholder and keeps its remaining text; a shell command, a / command, or a prompt the removal would empty is cancelled instead, with the placeholder still in the box.
Two smaller behaviours catch people out. A paste can carry Unicode that a terminal draws as nothing, such as tag characters, bidirectional controls and zero-width spaces, and Claude Code removes those when you press Enter, putting the cleaned prompt back in the box for a second Enter. And pasting text that begins with ! into an empty prompt switches the input into shell mode, the same as typing it.
What to do when the paste will not go in
- Paste something very large through a file instead. Anthropic says to write long logs and whole files to a file and ask Claude to read it, and it warns that the VS Code integrated terminal can drop characters from a very large paste before Claude Code ever sees it. In a terminal without bracketed paste, 2.1.299 fixed a long paste losing everything after an invisible control character.
- If the paste is meant to be several lines, check that it was not submitted line by line. The documented ways to write a multi-line prompt are
Ctrl+J, a backslash then Enter,Shift+Enter, and a direct paste, and 2.1.282 fixed one way that broke: a multi-line paste submitted line by line after the terminal's bracketed paste mode was reset mid-session. - If
Shift+Enterdoes nothing, it works without setup in iTerm2, Ghostty, Kitty, WezTerm, Warp, Apple Terminal and Windows Terminal, needs/terminal-setuponce in VS Code, Cursor, Devin Desktop, Alacritty before 0.16 and Zed, and is not available at all in gnome-terminal or the JetBrains IDEs. - If you deleted the placeholder by accident, paste the deletion back with
Ctrl+Y. Deleting through a placeholder removes it whole.
Anthropic documents no Claude Code key for pasting text, and the only key it documents for bringing something in from the clipboard is the image one below. That is why the input behaves differently depending on whether your terminal sends Ctrl+V or Ctrl+Shift+V, and why a paste can look like a Claude Code bug when it is a terminal setting.
Copying text out of a session
In fullscreen rendering, selecting text with the mouse copies it to your clipboard when you release the button. The switch behind that is Copy on select in /config, stored as copyOnSelect, which is a global-config key that defaults to true and is read only from ~/.claude.json.
With that switch off, copy with Ctrl+Shift+c. On a terminal that supports the kitty keyboard protocol, which includes kitty, WezTerm, Ghostty and iTerm2, Cmd+c also works, and with a selection active Ctrl+c copies instead of cancelling the turn.
The alternative is to let the terminal do the selecting. Holding its native-selection key while you drag hands the drag back to the terminal instead of Claude Code. The key is Fn in Terminal.app, Option in iTerm2, and Shift in VS Code, Cursor, Devin Desktop and most other terminals, with Option in those three instead when the editor’s terminal.integrated.macOptionClickForcesSelection setting is on. Claude Code shows the right one in an on-screen hint. Doing it this way all the time costs you nothing but the app's own mouse features: with mouse capture off you lose click-to-position, click-to-expand, URL clicking and wheel scrolling inside Claude Code, and keyboard scrolling with PgUp, PgDn, Ctrl+Home and Ctrl+End still works.
Where the copy lands depends on the system, and the paths differ. A local session runs a native tool: pbcopy on macOS, wl-copy on Wayland or xclip or xsel on X11, where both the clipboard and the PRIMARY selection are written so middle-click paste works, and PowerShell Set-Clipboard on Windows and WSL. On WSL, copy-on-select writes through PowerShell rather than OSC 52, which terminals such as MobaXterm do not support. Inside tmux the copy also goes to the tmux paste buffer, and Claude Code prints a toast after each copy naming the path it used. Over SSH none of those tools can reach your machine, so the text goes out as an OSC 52 escape sequence and your terminal decides what to do with it. That is the case where a copy can report success and change nothing. In the other direction, right-click paste on Windows and Linux and middle-click paste on Linux keep working on terminals that support them, and since 2.1.287 they fire when the button is released, so moving the pointer away first cancels the paste.
The command that skips the sandboxed shell entirely is /copy. It copies the last assistant response, a number copies the Nth-latest, and a response with code blocks or blockquotes opens a picker where you choose one block or the whole thing. Pressing w in that picker writes the selection to a file and prints the path, which is the documented fallback when the clipboard write cannot reach you. copyFullResponse, shown in /config as Skip the /copy picker, makes /copy take the whole response every time. In the transcript viewer, [ writes the conversation into the terminal's own scrollback so Cmd+F and tmux copy mode can search it, and v opens it in your editor. In the /btw overlay, c copies the answer as raw Markdown, and Anthropic gives the reason plainly: a mouse selection captures the hard-wrapped terminal rendering rather than the source text.
Copied text comes out wrapped, indented or padded
This is the highest-reaction report in this set, and the renderer's own documentation explains why. What you select with the mouse is what is drawn on the screen, and users describe three artifacts coming with it: lines broken at the terminal's width, the two-space indentation down the left, and spaces padding each line out to the edge. The report with 301 reactions says exactly that about indentation and trailing spaces, and another traces the padding to the renderer writing spaces instead of clearing to the end of the line.
One documented route gives you the source text. /copy copies the response rather than the rendering, and it is the reason Anthropic gives for the copy key in its own /btw overlay. The classic renderer is the other thing to try, and it is not a clipboard fix: you reach it with /tui default, with "tui": "default" in a settings file, or with CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN set to 1, and it leaves the conversation in your terminal's own scrollback so Cmd+F and tmux copy mode work on it.
There is no setting that takes the indentation or the wrap out of the rendered text. The settings reference carries two clipboard keys, copyOnSelect and copyFullResponse, and one renderer key, tui, which changes which renderer draws the page rather than how it pads it.
Release notes name a few narrower causes. Fenced code blocks inside list items used to carry their leading whitespace into the clipboard until 2.1.128. Older VTE-based terminals such as MATE Terminal printed a stray 52;c;… escape sequence on screen after a copy until 2.1.296. And over a very large paste, VS Code's own terminal can still drop characters before Claude Code sees them, which is a truncation rather than a formatting fault.
The tracker holds these as one systemic report. A meta issue opened in July 2026 groups 42 open copy and paste reports under seven causes it names itself, from hard line breaks at the render width to clipboard encoding corruption to mouse capture breaking native selection. It said all 42 were open on the day it was written, and it was still open when this page was read.
| Issue | What it reports | Filed | State |
|---|---|---|---|
| #18170 | A copy from the terminal adds unwanted indentation and trailing spaces, with 301 reactions | radrob2, 2026-01-14 | open |
| #15199 | Output formatting artifacts break copy and paste, and the workarounds cost tokens | pentafive, 2025-12-23 | open |
| #83961 | In the fullscreen renderer, a drag that auto-scrolls drops 26-character runs from the copy, and /tui default avoids it | felho, 2026-08-04 | open |
Pasting an image
Anthropic documents three ways to put an image into a conversation, and two of them do not involve the clipboard at all: drag the image onto the Claude Code window, copy it and paste with Ctrl+V or Alt+V on Windows and WSL, or give Claude the path to the file. The paste key is Ctrl+V, or Cmd+V in iTerm2, or Alt+V on Windows and WSL, and it is a rebindable action named chat:imagePaste in the keybindings file. A pasted image appears as an [Image #N] chip at the cursor so you can point at it by position in the prompt.
Once Claude has referenced an image, Cmd+Click on macOS or Ctrl+Click on Windows and Linux opens it in your default viewer, which is the quickest way to check that the chip is the picture you meant.
The one line the changelog names for a refused paste is No image found in clipboard. Two release notes name it: 2.1.181 fixed Ctrl+V showing it instead of pasting when the clipboard held text, and 2.1.141 fixed Windows Alt+V reporting it when the clipboard held a screenshot. The documentation lists Ctrl+V without tying it to a platform, adds Cmd+V for iTerm2 and Alt+V for Windows and WSL, and names no Linux-specific behaviour.
Size has messages of its own. Image was too large means a pasted image went past the API's size or dimension limits, and the documented fix is to resize before pasting, because the API accepts up to 8000 pixels on the longest edge for a single image or 3000 pixels when more than 20 images are in context. Separately, Request too large (max 32MB) is about the raw request body before tokenization rather than the context window, and /compact drops accumulated images and attachments. A third line, API Error: an image in the conversation could not be processed and was removed., means the API refused an image that was already in the conversation.
A fourth refusal is about the resize itself. Unable to resize image means Claude Code could not downscale the image before sending it, which it normally does on its own, and the message names the cause: a format whose dimensions it cannot read from the header, a damaged file, a CMYK JPEG, an animated WebP, or dimensions past the 2000x2000px limit. The documented fix is to convert the image to PNG, JPEG, GIF or WebP, or resize it below the limit, and attach it again.
Version matters more here than on most pages. Before v2.1.166 a pasted image could stay in the conversation and the same error repeated on every message; before v2.1.299 images attached while Claude was working, in VS Code, the desktop app and the Agent SDK, reached the API at their original size. WSL2 gained a PowerShell fallback for reading an image off the Windows clipboard in 2.1.136, and 2.1.275 made pasted images save where Claude can open them as files without a permission prompt. 2.1.310 fixed a background cleanup that deleted recent files, including pasted images, when cleanupPeriodDays was set very large.
What the documentation does not carry is a section for a paste that produces nothing at all. Its image material includes an image that is too large, an image it could not resize, a request over the size limit, and an image already in the conversation being removed. If your paste does nothing silently, there is no documented message to look up. If you arrived here holding a different printed message instead, our Claude Code error messages guide indexes the ones a session prints.
| Issue | What it reports | Filed | State |
|---|---|---|---|
| #8324 | No image can be pasted from the clipboard on Ubuntu with KDE on Wayland, after it worked in an earlier version | danielrosehill, 2025-09-28 | open |
| #32791 | Ctrl+V image paste stopped working in Windows Terminal, where the terminal binds the key to its own paste | Haotiandtc, 2026-03-10 | open |
| #66192 | Copy and paste stops working on macOS, with 31 comments and no settled cause | nvankita, 2026-06-08 | open |
What breaks, by terminal and platform
The same symptom often has a different cause on each setup, so start from the row that matches yours rather than from a fix list.
| Setup | What you see | What to try first |
|---|---|---|
| Windows Terminal | Ctrl+V does nothing for an image, or pastes text instead | Alt+V. The terminal binds Ctrl+V to its own paste, which a commenter on that report identifies as the likely cause |
| WSL | An image does not arrive on either key | Both keys are bound, so try Alt+V first. 2.1.136 added a PowerShell fallback for reading image data off the Windows clipboard |
| Linux, Wayland or X11 | The paste flashes and no chip appears | The documentation names no Linux-specific behaviour for this. Drag the image onto the window or give Claude the path, which are documented routes that skip the clipboard |
| Any shell inside the sandbox | A command that pipes to pbcopy, xclip or wl-copy leaves the clipboard unchanged | /copy, which writes from the Claude Code process instead of a sandboxed command and also saves the text to a file. 2.1.267 added guidance so Claude suggests it in that case |
The sandbox row is the one where the tool is doing exactly what it is documented to do. The product's own guidance in that situation now suggests /copy, which is why the row recommends it rather than a way to let a sandboxed command reach your clipboard.
| Setup | What you see | What to try first |
|---|---|---|
| Terminal.app on macOS | A drag does not select in the terminal's own buffer | Hold Fn while you drag, then copy with Cmd+C. Over SSH it is worse: Terminal.app has no OSC 52 either, so /copy cannot reach your Mac there |
| iTerm2 | /copy does nothing | Turn on Settings, General, Selection, Applications in terminal may access clipboard. /terminal-setup turns it on for you, and iTerm2 needs a restart |
| SSH to a remote machine | Selection works, and nothing reaches your computer | The text goes out as OSC 52, so your terminal decides. /copy with w writes the text to a file whose path it prints |
| tmux, or tmux over SSH | Over SSH a copy in tmux never reaches your desktop clipboard | Inside tmux the copy also goes to the tmux paste buffer, so paste with tmux’s own key there |
| VS Code, Cursor, Devin Desktop | A drag does not select in the terminal's own buffer | Shift while you drag selects natively. /terminal-setup also writes the Shift+Enter binding these editors need |
The switches that change it
Every item below is documented, and each one changes a different part of the behaviour. None of them is a general fix for a paste that does nothing.
| Setting or command | What it changes |
|---|---|
copyOnSelect | Whether a mouse selection copies on release in fullscreen rendering. Defaults to true, lives in ~/.claude.json, and is ignored in settings.json |
copyFullResponse | Whether /copy skips its picker and always takes the whole response. Defaults to false |
/tui default and /tui fullscreen | Which renderer draws the session. The command relaunches with the conversation intact, and the tui key it writes takes "default" or "fullscreen" |
| Switch | What it changes |
|---|---|
CLAUDE_CODE_DISABLE_MOUSE | Turns mouse tracking off for the session and keeps keyboard scrolling, which is the documented way to keep the terminal's native copy-on-select |
CLAUDE_CODE_DISABLE_MOUSE_CLICKS | Keeps wheel scrolling and drops click, drag and hover handling. Needs v2.1.195 or later, and CLAUDE_CODE_DISABLE_MOUSE wins when both are set |
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN | Uses the classic renderer so the conversation stays in the terminal's scrollback, and takes precedence over the renderer settings |
chat:imagePaste | The rebindable action behind the image paste key, bound to Ctrl+V and to Alt+V on Windows and WSL |
/terminal-setup | Writes the Shift+Enter binding for the editors that lack it, and turns on iTerm2's clipboard access so /copy works |
Which reports are still open
Anthropic's tracker is a stream of reports rather than a changelog, and an issue filed a year ago says little about the build you are running. Searching it on October 26, 2026 returned 107 issue titles containing "copy paste", 277 containing "clipboard", and 208 containing "paste image". The rows below are the ones this page rests on, with the login that filed them, the day they were filed and the state they were in when read.
One of them is not a bug report at all. A meta issue opened in July 2026 collects 42 open reports under seven causes and argues that copy fidelity should be a renderer requirement. It was open on the day this page was read, and its own note that all 42 linked issues were open applies to the day it was written rather than to today.
| Issue | What it reports | Filed | State |
|---|---|---|---|
| #18170 | Indentation and trailing spaces in a copy from the terminal, 301 reactions | radrob2, 2026-01-14 | open |
| #15199 | Formatting artifacts break copy and paste, and the workarounds waste tokens | pentafive, 2025-12-23 | open |
| #66192 | Copy and paste does not work, on macOS, with no settled cause | nvankita, 2026-06-08 | open |
| #29199 | Cmd+C and Cmd+V stop working frequently in the desktop app | benefihealth, 2026-02-27 | open |
| #61021 | Text can no longer easily be selected to copy, in VS Code and on Windows | Amnesiac9, 2026-05-21 | open |
| Issue | What it reports | Filed | State |
|---|---|---|---|
| #8324 | Image paste fails on Ubuntu with KDE on Wayland, reported as a regression | danielrosehill, 2025-09-28 | open |
| #32791 | Ctrl+V image paste stopped working in Windows Terminal | Haotiandtc, 2026-03-10 | open |
Three long-running copy reports changed state four days before this page was written, and the reason matters. #22073, #13378 and #6827 were all closed on 2026-10-22 as duplicates, not as fixed. A duplicate closure does not mean the behaviour changed, and none of their comment threads carries a fix note.
One older image-paste report ended differently. #1361 was closed as completed on 2025-11-21, and a commenter there wrote that reinstalling through the newer install script rather than npm made image paste work on Ubuntu. That is one person's report, and the Linux report above, filed four months later, calls the same failure a regression.
When the terminal is the problem
Omniscio is the desktop app we make for running many Claude Code sessions at once, and it is a different place to put an image rather than a fix for your terminal. An image goes onto a message through the paperclip, by dragging it onto the conversation window, or by pasting from the clipboard with Ctrl+V, or Cmd+V on a Mac, including a screenshot, and a pasted image is given a name such as pasted-image.png. The caps are 30 MB per image, 32 MB per document and 2 MB per pasted-text chip, with no practical count cap on how many you attach.
Images, PDFs and text documents are all accepted, and Office formats such as .docx, .xlsx and .pptx are extracted to Markdown before the message is sent. A file it cannot take is named in one toast that gives the reason, so silence never means it is still working, and an attached image is sent as an image block rather than saved into your project folder. The Attach a file page in our library has the whole of it. The features page covers the rest of the app, and the download page has the installers.
Sources
Every key, setting and version note on this page rests on one of these. The date beside each one is the day we read it.
- Interactive mode, for the image paste key and the
[Image #N]chip, the invisible-character rule, shell mode on a pasted!, the multiline table, the transcript viewer keys and the/btwcopy key. Read October 26, 2026. - Keybindings, for
chat:imagePasteand its Windows and WSL default. Read October 26, 2026. - Terminal configuration, for the paste placeholder, its cache and retention, the feature-flag note, the
Shift+Entertable, and the iTerm2 clipboard setting/terminal-setupturns on. Read October 26, 2026. - Fullscreen rendering, for Copy on select, the manual copy keys, the native-selection key per terminal, the clipboard tool per system, the tmux buffer and the OSC 52 fallback. Read October 26, 2026.
- Troubleshooting, for a copy that does not reach a local clipboard over SSH, and for clipboard commands failing inside the sandbox. Read October 26, 2026.
- Settings reference, for
copyOnSelect,copyFullResponseandtui. Read October 26, 2026. - Environment variables, for the three
CLAUDE_CODE_*switches listed above. Read October 26, 2026. - Commands reference, for
/copyand/tui. Read October 26, 2026. - Error reference, for
Image was too large,Request too largeand the removed-image line. Read October 26, 2026. - Common workflows, for the three ways to add an image and the click-to-open behaviour. Read October 26, 2026.
- Changelog, for every version note on this page, up to 2.1.310 on October 23, 2026. Read October 26, 2026.
- Anthropic's Claude Code issue tracker, read through the GitHub REST API on October 26, 2026, for the search counts and for every report in the tables above.
- Our own library page, Attach a file, for the Omniscio section. Read October 26, 2026.
Anthropic's documentation and its changelog both move with nearly every release. The newest release on the changelog the day this was read was 2.1.310, dated October 23, 2026. Read these again before trusting a copy of this page from a few months back.
Common questions
Why does Ctrl+V paste an image instead of my text?
Ctrl+V is the documented key for pasting an image, and on Windows and WSL both Ctrl+V and Alt+V are bound to it. Since 2.1.181 a Ctrl+V with text on the clipboard pastes the text instead of reporting that no image was found, so on a current build the key falls through to your text. If it does not, update Claude Code, or paste text with the terminal's own paste key.
Why does a copy from Claude Code come out with extra line breaks and indentation?
The renderer draws the conversation for the screen, not for the clipboard, so a mouse selection carries the visible layout: lines broken at the terminal width, the left-hand indentation, and padding out to the edge. Anthropic documents no setting that turns either one off, and the report asking for one was closed as a duplicate on 2026-10-22. The documented route to clean text is /copy, which copies the source rather than the rendered text. The classic renderer is the other thing to try: it hands the conversation back to your terminal's own scrollback, so a drag selects there instead.
How do I copy a whole response without the formatting?
Run /copy. It copies the last assistant response, a number copies the Nth-latest, and a response with code blocks or blockquotes opens a picker where you choose a block or the whole response. Pressing w in that picker writes the selection to a file and prints the path, which is the route to use over SSH. /copy writes from the Claude Code process itself, so it also works when a sandboxed shell cannot reach your clipboard.
Why can I not select text in Claude Code at all?
In fullscreen rendering Claude Code captures the mouse, so click and drag selects inside the app rather than in your terminal. Hold your terminal's native-selection key while you drag: Fn in Terminal.app, Option in iTerm2, Shift in VS Code, Cursor, Devin Desktop and most other terminals. Setting CLAUDE_CODE_DISABLE_MOUSE to 1 hands the whole session back to the terminal and keeps keyboard scrolling.
How do I paste an image into Claude Code on Linux?
Anthropic's documentation lists Ctrl+V without tying it to a platform, and names no Linux-specific behaviour. Two reports this page read cover it, one closed as completed in November 2025 and one open since September 2025 that calls it a regression. Two documented routes do not use the clipboard: drag the image onto the window, or give Claude the image path.
Why did my pasted text turn into Pasted text #1?
A paste of more than 800 characters or more than three lines is collapsed to a placeholder so the input box stays usable, and the full content is still sent when you submit. The content behind the placeholder is kept under your Claude directory, so a prompt recalled from history resends it. If that file has since been swept by the retention rules, the literal placeholder is never sent: a plain prompt keeps its remaining text, and a shell or slash command is cancelled instead.