codex - 💡(How to fix) Fix Allow /copy to target a specific assistant response by id

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

The current workaround is either:

Code Example

/copy          # current behavior: copy latest assistant response
/copy 12       # copy assistant response with id 12
/copy a12      # copy assistant response with explicit assistant-message id
/copy last-2   # copy the previous assistant response

---

assistant #42
...
RAW_BUFFERClick to expand / collapse

What problem are you trying to solve?

In the Codex CLI TUI, /copy currently copies the latest assistant response as markdown. That is useful, but it is hard to copy an earlier assistant response cleanly.

The current workaround is either:

  • ask Codex to repeat the earlier answer and then run /copy, which burns tokens and adds friction;
  • manually select text in the terminal, which often captures extra indentation, soft-wrap artifacts, or surrounding TUI formatting.

This is especially painful when copying markdown/code blocks from previous answers into chats, tickets, docs, or issue comments.

Related broader request: #2880. This issue is a narrower request for addressable copy of a specific message.

Proposed solution

Add a way for /copy to target a specific assistant response.

Possible command shapes:

/copy          # current behavior: copy latest assistant response
/copy 12       # copy assistant response with id 12
/copy a12      # copy assistant response with explicit assistant-message id
/copy last-2   # copy the previous assistant response

The TUI could expose compact ids for assistant messages, for example:

assistant #42
...

Alternatively, ids could stay out of the main transcript and be discoverable through /history or message metadata.

Why this would help

This would make /copy useful for more than the latest response while preserving clean markdown output and avoiding terminal-selection artifacts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING