Add Clipboard Copy Functionality for Current Prompt
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 10 comments · opened Aug 2, 2025
Update Aug 15 2025: I made the ch TUI app to implement this feature outside of claude code - https://github.com/anthropics/claude-code/issues/5005#issuecomment-3192509380
Use case
In claude code, I often want to copy the text in my prompt to my clipboard. I save these prompts to sublime text, and then often paste it into vscode + copilot, or gemini.
Suggested shortcut
Would you consider adding a keyboard shortcut (eg: <kbd>Ctrl+Shift+c</kbd>) and action to copy the contents of the claude code prompt editor?
vim mode missing this feature too
Even in vim mode, there is no keyboard shortcut to copy the current prompt.
claude code is awesome. Thank you!
10 Comments
Even better would be if copy and paste just worked, right? Like OP, I often want to save my prompts elsewhere, or even switch between Claude Code and claude.ai.
The problem of course stems from Claude Code's fancy UI. It's using text characters to draw a box:
But, this box _really_ isn't necessary, especially at the cost of breaking copy and paste! It would be just as clear where to type with only the separator lines:
And then let the Terminal line wrap the characters itself. No fancy formatting = easy copy and paste.
Here's how it looks with mutliple lines. Note that because Github doesn't wrap text in code blocks, I have to add line breaks (bad for copy and paste) for it to look right on here. However, a Terminal would automatically wrap the text. The idea is that everything from the starting
>to the end of your prompt can be plain text, nothing added.This small change would improve my life. Thanks for considering.
Another option could be to add a new
/history-copycommand which could display a list of prompts (similar in a way to/resume). Then upon selecting one, the contents of this prompt could be copied to the clipboard and ready to paste wherever.Many times I go back to previous prompts, copy them and paste into a new session to start over from there, but I have to tidy up the copied text from the extra characters and spaces
edit:
I just found out that in iterm2 I can use opt+command+mouse for rectangular selection which helps a lot.
I have actually create a small TUI app called
ch(Claude Code History) to be a workaround for this missing feature.You can see a video of it in action here:
<!-- https://github.com/user-attachments/assets/94799739-ff7b-48b3-8bf5-b0e210ee1b30 -->
<video src="https://github.com/user-attachments/assets/94799739-ff7b-48b3-8bf5-b0e210ee1b30" controls></video>
To install it, you have to use
rustup. Here is more information on it.Here are the basic steps on Linux:
I use tmux and the prompt comes out like weird, would like a fix. this should be one line of text, and not include the pipes
|.Why does copy paste not work? This is modern tech? Can't copy and paste text? What? My experience so far has been abysmal.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
+1 to having a special shortcut like ⌘+Shift+C to copy the current prompt to the clipboard. Sometimes I have multiple Claude code instances open and I realize I wrote a long prompt in the wrong window and I'd like to copy the prompt more easily than to select all those wrapped lines with a mouse and strip out all the ascii box characters like a caveman.
It is really unexpected to not have a good workaround to copy current prompt to clipboard.
Also in vim mode
yydoes nothing. Cannot usepafterwards either.Different use case than the prompt editor shortcut requested here, but related: I made a small skill that adds
/yankfor general clipboard access.https://github.com/joelev/yank
Install:
Cross-platform (macOS, Linux, Windows via WSL), ~40 lines. Claude will also offer to yank when generating prompts or snippets you might want to paste elsewhere.
Doesn't solve the keyboard shortcut request, but helps with the general "get stuff onto my clipboard" problem.