Skip to content

Copy button does not work for user messages in sessions #60398

Closed

Description

@mahdikarimi657

Description

Title

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

  1. Open any OpenCode session.
  2. Locate a message sent by the user.
  3. Click its copy button.
  4. Notice that nothing is copied to the clipboard.
  5. Repeat the same action on an agent message and observe that copying works correctly.

Screenshot

Image

Operating System

windows 10

Terminal

Opencode Desktop

Activity

  1. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    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.

  2. mahdikarimi657 commented on Oct 30, 2026

    @mahdikarimi657
    Author

    Ok thank you for reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions