# /copy Command

> It copies Claude's last reply to the clipboard.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** /copy, Copy last response

## Think of it like

It is like tracing a picture so you can take it home.

## Definition

/copy puts Claude's last reply on your clipboard. /copy 2 takes the reply before that one, and so on. When the reply has code blocks, a picker lets you take one block or the whole reply. Press w in the picker to save the choice to a file instead. That helps over SSH, where the clipboard may not reach your own computer.

## Example

Claude writes Lucy a SQL query inside a long answer. She types /copy, picks just the code block, and pastes it into her database tool.

## Example code

```console
/copy 2
```

Copy the reply before the last one.

## Why it matters

Selecting text with the mouse in a terminal often grabs line breaks and borders. /copy takes the clean text.

## Common mistake

Selecting a long reply by hand and losing part of it to the scroll. /copy takes the whole thing at once.

## Three principles

- **Last reply.** Or the Nth one back.
- **Pick a block.** When there is code.
- **Or save to a file.** Press w.

## Related terms

- [/export Command](https://learn.benibix.com/term/ai/export-command)
- [Claude Code Session](https://learn.benibix.com/term/ai/claude-code-session)

## Taught in

- [Context, Recap and Copy](https://learn.benibix.com/learn/ai-claude-code-commands/context-recap-and-copy): Claude Code Commands, 5/17

---

Source: https://learn.benibix.com/term/ai/copy-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
