/copy only copies the latest assistant step instead of the full multi-step response
Summary
When Codex produces output in multiple assistant steps, the /copy command only copies the most recent step to the clipboard. This makes it easy to lose important earlier parts of the answer, especially when Codex has produced a long explanation, a patch, a diff, or staged instructions over several steps.
Problem
In a long Codex interaction, the assistant response may be split into several visible steps. However, when using:
/copy
or the keyboard shortcut:
Ctrl-O
only the latest visible step is copied.
This is very limiting because the user often expects /copy to copy the complete assistant response, not just the last fragment.
Example
A user asks Codex to produce a fix. Codex responds in several steps, for example:
- Explanation of the issue
- Proposed approach
- Patch/diff
- Follow-up notes
When the user runs /copy, only step 4 is copied, while steps 1–3 are omitted.
In my case, the important part was an exact diff, but /copy only captured the latest step instead of the whole response.
Expected behavior
/copy should offer a way to copy the entire assistant response, including all assistant-generated steps that belong to the current turn.
At minimum, there should be a clear distinction between:
- Copy latest step
- Copy full assistant response
- Copy full conversation turn
- Copy selected block/diff/code section
Actual behavior
/copy copies only the latest assistant step.
This is surprising because the UI presents the multi-step output as part of the same assistant response, but the clipboard only receives the last part.
Why this matters
This is especially problematic for coding workflows because Codex often emits useful output progressively:
- diffs
- build logs
- patch explanations
- terminal commands
- multi-file change plans
- follow-up instructions
If only the last step is copied, users can accidentally paste incomplete patches or lose the reasoning and context needed to apply a fix safely.
For long debugging sessions, this is not just inconvenient. It can make the output unreliable to use outside the terminal.
Suggested fix
Add a copy mode that copies the entire assistant response/turn, not only the latest step.
Possible UI/CLI behavior:
/copy latest
/copy response
/copy turn
/copy all
/copy selection
Or make /copy default to the full assistant response, and provide a separate command for copying only the latest step.
Environment
- Product: Codex CLI
- Observed behavior:
/copyorCtrl-Oonly copies the latest assistant step - Use case: Long multi-step coding/debugging responses with diffs and patch instructions
Impact
High usability impact for CLI-based coding workflows.
The current behavior makes /copy unreliable when Codex output is split across multiple steps.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for triaging this.
I would like to clarify that I believe this should be treated as a BUG, not an enhancement request.
The current behavior makes
/copycompletely unusable for longer multi-step responses because it copies only the latest assistant step, even when the visible assistant response is clearly part of a larger multi-step answer. From a user perspective, the command appears to copy “the response”, but it silently drops earlier parts.This is especially problematic when the output is long. If Codex produces 15–20 pages of text, patch explanation, commands, logs, or diffs, copying only the last step is not acceptable behavior. It can result in incomplete instructions, missing context, or partial patches being pasted elsewhere.
I understand that adding more granular copy modes such as
/copy latest,/copy response, or/copy turncould be considered an enhancement. But the underlying issue is that the current/copybehavior does not copy what the user reasonably expects it to copy.So I would suggest keeping the
CLIandTUIlabels, but changing this fromenhancementtobug.Regarding #20625:
I agree that the issues are related, but I think #20625 is too vague to fully cover this BUG.
That issue mainly asks for an enhancement:
/copy Nsupport and more flexible selection, similar to Claude Code. That would be useful, but it does not clearly describe the current failure mode:/copycan silently copy only the latest assistant step while omitting earlier parts of what appears to be the same visible multi-step response.The important distinction here is:
/copybehavior becomes unusable for long multi-step Codex responses.For short outputs, this may look like a missing convenience feature. But for long outputs — for example 15–20 pages of explanation, commands, logs, diffs, and follow-up notes — copying only the final step is not a reasonable or safe default.
So I think #20625 is related, but this issue should either remain open as the clearer bug report, or #20625 should be updated to explicitly track this as a bug:
/copyonly copies the latest assistant step and silently drops earlier parts of the same multi-step response.Closing in favor of #20625. If you don't think that adequately covers the functionality you're looking for, please post to that thread.