claude-code·Published 2026.06.01
Claude Code /copy: Instantly Copy AI Answers Elsewhere
A beginner-friendly guide to /copy, which copies Claude's last answer straight to the clipboard and, with a number, lets you pick an earlier answer too.
When you try to drag with the mouse to move code Claude made into another file, lines often end up misaligned or only part gets selected. The command that copies an answer cleanly in one whole piece is /copy.
Definition (what it is)
/copy is a command that copies Claude's last answer to the clipboard. Add a number and you can pick and copy up to the Nth earlier answer.
The clipboard is a temporary storage space that briefly holds copied content. Once you copy an answer with /copy, you can move it into another file or a notepad by pasting (usually Ctrl+V on Windows, Cmd+V on Mac).
How to use it (by difficulty)
Basic — copy the last answer
/copy
Typing this copies the most recent answer to the clipboard. Then just paste it wherever you want to move it. A brief notice that it was copied appears on screen.
Applied — pick and copy an earlier answer
/copy 2
Adding a number copies the answer that many steps back from the end. /copy 2 grabs the second-to-last answer. It's useful when you need an answer you got before the most recent one.
Common pitfalls
- A copy only lives in the clipboard. If you copy something else after copying, the previous content gets overwritten, so paste it where it's going first, then do the next copy.
- If you give too large a number, there may not be that many earlier answers. When the conversation is short, start with small numbers and check as you go.
Real-world example
You can grab a code block Claude made with /copy and paste it straight into the file you're working on. It moves cleanly without the line misalignment or partial omission that happens when copying by dragging with the mouse.
Taking it further
Since you can copy answers immediately, moving results elsewhere to reuse them is easy. Beyond code, you can also use it to move explanations Claude organized or command lists into your notes.
Summary
/copy is a command that copies Claude's last answer to the clipboard, and adding a number lets you pick and copy an earlier answer. Use it to move results cleanly into another file or your notes.
Based on Claude Code v2.1.154 (2026.05)
Comments
Comments 0
Checking sign-in status…
Loading comments…