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 button does not work for user messages in sessions #60398
Copy button does not work for user messages in sessions
Description
There is a bug with the copy button on user messages in OpenCode sessions.
The copy button is available on both user messages and agent messages, but its behavior is inconsistent:
User messages: Clicking the copy button does nothing. The message is not copied to the clipboard.
Agent messages: The copy button works correctly and successfully copies the message content to the clipboard.
Expected Behavior
Clicking the copy button on any message, whether sent by the user or generated by the agent, should successfully copy that message's content to the clipboard.
Actual Behavior
The copy button works for agent messages but does not work for user messages.
Plugins
No response
OpenCode version
Version 2.2.2
Steps to reproduce
Open any OpenCode session.
Locate a message sent by the user.
Click its copy button.
Notice that nothing is copied to the clipboard.
Repeat the same action on an agent message and observe that copying works correctly.
Thanks for the clear report! I couldn't reproduce this here: the problem is in OpenCode Desktop on Windows, and this sandbox can't run the desktop app or check its clipboard. A maintainer with that setup will need to look at it.
In 2.2.2, a user message is copied from the "Copy message" item in its "more actions" menu, while an agent reply has its own copy button. Both use the same clipboard helper, so the difference may come from the menu. This is a guess I haven't confirmed. I didn't find an existing issue for this.
Until it's looked at, selecting the message text and pressing Ctrl+C may work as a workaround.
Activity
opencodejr commentedon Oct 29, 2026
Thanks for the clear report! I couldn't reproduce this here: the problem is in OpenCode Desktop on Windows, and this sandbox can't run the desktop app or check its clipboard. A maintainer with that setup will need to look at it.
In 2.2.2, a user message is copied from the "Copy message" item in its "more actions" menu, while an agent reply has its own copy button. Both use the same clipboard helper, so the difference may come from the menu. This is a guess I haven't confirmed. I didn't find an existing issue for this.
Until it's looked at, selecting the message text and pressing Ctrl+C may work as a workaround.
mahdikarimi657 commentedon Oct 30, 2026
Ok thank you for reply