You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/copy copies the entire session instead of the latest agent response #27967
When using the /copy command, opencode currently copies the entire conversation from the beginning of the session.
I expected /copy to copy only the latest agent response, or at least provide a way to choose what part of the latest response should be copied.
Current behavior
Running /copy copies the whole conversation history from the start of the current session.
This becomes inconvenient in longer sessions because the clipboard contains much more text than needed.
Expected behavior
The /copy command should copy the latest agent response by default, not the entire session.
Additionally, it would be useful to have behavior similar to Claude Code: before copying the response, opencode could ask what exactly should be copied, for example:
Copy the entire latest response
Copy only a specific section/code block
Copy selected text/snippet
Why this would be useful
In many cases, the user wants to copy only the most recent answer, especially when the response contains a command, code block, config snippet, or explanation.
Copying the whole session requires extra manual cleanup and makes /copy less practical in longer conversations.
Suggested behavior
Possible options:
Change /copy default behavior to copy only the latest assistant response.
Add a separate command for the full session, for example:
/copy session
/copy all
Add an interactive selection flow:
Run /copy
Prompt the user to choose which part of the latest response to copy
Reference
Claude Code has a useful copy flow where it asks what part of the response should be copied instead of blindly copying the entire conversation.
This appears to be a feature request, but it does not use the feature request template. The title must start with [FEATURE]: and the issue must include the verification checkbox confirming the feature hasn't been suggested before.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
Activity
github-actions commentedon May 17, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:and the issue must include the verification checkbox confirming the feature hasn't been suggested before.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
/copybehavior and adding options for which part of the session to copy)If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon May 17, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.