Cmd. /copy
Pick a whole Codex response, code block, or blockquote and copy it as Markdown.
Written and reviewed by Eric Han · Co-founder & CTO, reopt
Key takeaways
- Pick a whole Codex response, code block, or blockquote and copy it as Markdown.
- From 0.162.0, move between transcript blocks with the arrow keys or
j/kand press Enter to copy; copying a mouse selection is separate from/copy.
Purpose
Pick a whole Codex response, code block, or blockquote and copy it as Markdown; the 0.162.0 release notes add navigating and copying transcript blocks.
/copyAvailability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Built-in |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-10-23 · Codex CLI 0.163.0 |
The installed command menu and account or organization settings determine availability.
Examples
/copyWhen to use it
- Copy a complete plan into an issue, pull request, or team message.
- Select only the reusable code block or blockquote from a long response.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/copy | Selects a whole response, code block, or blockquote | You want to reuse part or all of a result |
/raw | Simplifies terminal scrollback | You need to select parts of multiple turns or logs |
/diff | Shows working-tree changes | You need code changes rather than response text |
Effects and persistence
Copies the selected response or supported content to the clipboard. Check the selected scope before pasting elsewhere.
/copy selects the whole completed response, a code block, or a blockquote and copies it to the clipboard.
copy behavior
/copy also supports status output and individual session fields. Response copies preserve formatting in rich-text applications. Choose the required item from the installed picker.
official changelog · 2026-09-12 KST
Copying a mouse selection from the transcript is separate from /copy. From 0.158.0, selection copies also keep Markdown formatting, and from 0.159.0 they preserve tables and significant whitespace. tui.copy_on_select decides whether a selection is copied immediately.
From 0.162.0, /copy navigates and copies transcript blocks. According to the pull-request description, it selects the latest completed response directly in the transcript that Codex renders itself (the owned transcript); arrow keys or j/k move between user messages, code blocks, and blockquotes, and g/G jump to the ends. Press Enter to copy and Escape to close.
The same release adds Ctrl+Insert as a copy key for selections. Windows Terminal forwards Ctrl+Insert when its Copy action has no native terminal selection, so the key copies text selected inside Codex, in the transcript or the composer. Both changes are confirmed from release notes and are not in the official command page yet.
Update
- The old whole-response flow now opens a picker for the full response, individual code blocks, and blockquotes.
Changelog ahead of command reference
The 0.150.0 official changelog is the source for the picker. The current detailed Developer
Commands section still describes the pre-picker “latest completed output” flow, including the
before-first-response, in-progress-turn, rollback, and Ctrl+O edge cases. This page combines the
new release behavior with those still-applicable reference constraints instead of pretending the
two official pages were updated at the same time.
Cautions
- It does not copy partial output from the active turn.
- It is unavailable without a completed response or immediately after rollback.
- Check for secrets before sharing clipboard contents externally.
Official sources
Complete command list · Verification scope · History for this command