claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Text cannot be copied from Claude Code's output using `Ctrl+Shift+C` or right-click context menu.

Open qtamaki opened this issue 6 months ago β€’ 20 comments

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?

Text cannot be copied from Claude Code's output. Neither Ctrl+Shift+C, right-click context menu, nor middle-click (X primary selection) work. Other CLI tools in the same terminal allow normal text selection and copy.

What Should Happen?

Text in the terminal output should be selectable and copyable using standard terminal copy methods (Ctrl+Shift+C, right-click, or mouse selection + middle-click).

Error Messages/Logs


Steps to Reproduce

  1. Open a terminal and run claude
  2. Send any prompt and wait for the response
  3. Try to select text in the response with the mouse
  4. Press Ctrl+Shift+C or right-click β†’ no copy operation works
  5. Try mouse selection + middle-click β†’ also does not work

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.152 (Claude Code)

Claude Code Version

2.1.152 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Claude Code's TUI may be capturing mouse events or placing the terminal in a mode (e.g. raw mode or alternate screen) that interferes with normal text selection. This does not occur with other terminal-based AI tools.

qtamaki avatar May 27 '26 04:05 qtamaki

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/61936
  2. https://github.com/anthropics/claude-code/issues/62462
  3. https://github.com/anthropics/claude-code/issues/62457

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and πŸ‘ the existing issue instead
  • To prevent auto-closure, add a comment or πŸ‘Ž this comment

πŸ€– Generated with Claude Code

github-actions[bot] avatar May 27 '26 04:05 github-actions[bot]

What terminal emulator are you using? Use /tui default to change back to the version that allows native selection, but each terminal also has a button to press to enable this for that interaction: Terminal.app: Fn, iTerm2: option

thomasballinger avatar May 27 '26 15:05 thomasballinger

I see the same issue in terminator (ubuntu 24)

Servo97 avatar May 27 '26 16:05 Servo97

Same issue

Sorrow321 avatar May 30 '26 00:05 Sorrow321

Same issue on Raspberry Pi 5 running DietPi (Debian)

NeilGraham avatar May 30 '26 05:05 NeilGraham

same issue in my pycharm terminal on ubuntu

fabian-lu avatar Jun 01 '26 07:06 fabian-lu

try hold shift while dragging to select text, then copy whith ctrl+shift+c, this worked for me in ubuntu

ulloacastillo avatar Jun 02 '26 14:06 ulloacastillo

Workaround is in 62706

larytet avatar Jun 05 '26 19:06 larytet

try hold shift while dragging to select text, then copy whith ctrl+shift+c, this worked for me in ubuntu

I am pressing Shift this for two weeks. Annoying,

larytet avatar Jun 05 '26 19:06 larytet

it's already fix?

vandyahmadldm avatar Jun 10 '26 01:06 vandyahmadldm

I'm using tmux and this workaround works for me: https://github.com/anthropics/claude-code/issues/62699#issuecomment-4603339169

jvanvolken avatar Jun 11 '26 11:06 jvanvolken

The linked workaround is a different issue to this was afaics, as this happens in a native tty, not on a remote or tmux session. It didn't work for me.

1stvamp avatar Jun 12 '26 10:06 1stvamp

This is so dumb. Not being able to copy text when claude says "Run this command in another terminal".

I found a dumb workaround as claude -p creates text you can copy.

$ claude -n foobar -p "What is the meaning of life" (The philosophical short answer: most traditions converge on something like connection, purpose, and growth β€” but the honest answer is that it's a question each person has to answer for themselves through how they live.)

$Β claude --resume foobar -p "In what book was the answer 42?" The Hitchhiker's Guide to the Galaxy by Douglas Adams. In the story, a supercomputer called Deep Thought spends 7.5 million years calculating the "Answer to the Ultimate Question of Life, the Universe, and Everything" β€” and the answer is 42. The catch: nobody remembers what the actual question was.

==========================================

claude --resume history -p "How to I name a session on startup, rename a session while in the session, resume that sesion later?" Name on startup:

claude -n my-session-name

Rename while in a session:

/rename my-session-name

Resume later:

claude --resume my-session-name

Or run claude --resume with no argument to open an interactive picker and search by name.

DennisFaucher avatar Jun 15 '26 18:06 DennisFaucher

or


fix-tengu() {
    python3 -c "
import json, pathlib
p = pathlib.Path.home() / '.claude.json'
d = json.loads(p.read_text())
d['tengu_pewter_brook'] = False
p.write_text(json.dumps(d, indent=2))
print('tengu_pewter_brook set to false')
"
}

alias claude='fix-tengu && command claude'


On Mon, Jun 15, 2026 at 9:28β€―PM Dennis Faucher @.***> wrote:

DennisFaucher left a comment (anthropics/claude-code#62699) https://github.com/anthropics/claude-code/issues/62699#issuecomment-4711087863

This is so dumb. Not being able to copy text when claude says "Run this command in another terminal".

I found a dumb workaround as claude -p creates text you can copy.

$ claude -n foobar -p "What is the meaning of life" (The philosophical short answer: most traditions converge on something like connection, purpose, and growth β€” but the honest answer is that it's a question each person has to answer for themselves through how they live.)

$ claude --resume foobar -p "In what book was the answer 42?" The Hitchhiker's Guide to the Galaxy by Douglas Adams. In the story, a supercomputer called Deep Thought spends 7.5 million years calculating the "Answer to the Ultimate Question of Life, the Universe, and Everything" β€” and the answer is 42. The catch: nobody remembers what the actual question was.

==========================================

claude --resume history -p "How to I name a session on startup, rename a session while in the session, resume that sesion later?" Name on startup:

claude -n my-session-name

Rename while in a session:

/rename my-session-name

Resume later:

claude --resume my-session-name

Or run claude --resume with no argument to open an interactive picker and search by name.

β€” Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/62699?email_source=notifications&email_token=AABZHBOSSLTSVPI27MLBZN35AA54ZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZRGEYDQNZYGYZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4711087863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZHBNFWPAK4BBNJYRZ7WT5AA54ZAVCNFSNUABFKJSXA33TNF2G64TZHM4TGNZSGUZTINZVHNEXG43VMU5TINJSHE2TSNBYGY42C5QC . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/AABZHBMOYVUOI4Q4VTKIV2L5AA54ZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZRGEYDQNZYGYZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y and Android https://github.com/notifications/mobile/android/AABZHBNZ2SOXCMTSAOV6OEL5AA54ZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZRGEYDQNZYGYZ2M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI. Download it today! You are receiving this because you commented.Message ID: @.***>

larytet avatar Jun 15 '26 18:06 larytet

What terminal emulator are you using? Use /tui default to change back to the version that allows native selection, but each terminal also has a button to press to enable this for that interaction: Terminal.app: Fn, iTerm2: option

Yes, this workaround with default mode works for me. Ubuntu 26.04, ptyxis as terminal app, claude 2.1.191

diserere avatar Jun 25 '26 07:06 diserere

Same for me ;(

ahik avatar Jun 27 '26 15:06 ahik

It cannot copy

rahmanusta avatar Jun 28 '26 13:06 rahmanusta

Once CC is up and showing its interface, type this as a command inside CC: /tui default Then test: scroll with your normal mouse wheel, and try a plain mouse click-drag (no Shift needed) to select some text, then Ctrl+Shift+C.

MikkelStaalEggen avatar Jun 30 '26 09:06 MikkelStaalEggen

Fedora. Tilix. Same annoying issue.

qmaruf avatar Jul 02 '26 06:07 qmaruf

Very bad issue, the trick to "hold" shift is ok for a little bit of text...

Mil00Z avatar Jul 03 '26 11:07 Mil00Z