Command reference Β· Claude Code
/copy
Copies Claude's last response to the clipboard.
/copy copies Claude's most recently sent response to the clipboard. With a number N, it instead copies the Nth-to-last response β so /copy 2 copies the second-to-last one; /copy 1 is equivalent to calling it without an argument.
If the response contains code blocks, /copy opens an interactive selection dialog: you can choose a single code block or the full response. In this dialog, pressing w writes the selection to a file instead β useful over SSH connections, where the system clipboard is often unreachable. The dialog also lets you permanently configure /copy to always copy the full response directly in the future, without showing the code block selection again.
/copy differs from /export: /copy only copies a single response for the clipboard, while /export writes the entire conversation as text to a file or opens a save dialog.
π THE SAME TASK (βCOPY RESPONSE/TEXTβ) ON OTHER PLATFORMS
β WHEN TO USE IT?
Copy the last response directly to the clipboard
/copy after a response with a finished code snippet
Write the response to a file instead, over SSH without a working clipboard
/copy, then press 'w' for the file export
β WHEN NOT TO?
Wanting to copy an older response, not the last one
without a number argument, /copy always copies only the last response
Better: /copy 3 for the third-to-last response, or /export for the entire conversation
Saving the entire conversation, not just one response
/copy always transfers only a single response to the clipboard or file, never the whole history.
Better: /export for the entire conversation as a text file.
SOURCES
- Claude Code docs (official) β code.claude.com
MORE COMMANDS Β· Claude Code