No way to select or copy text, either in the input field or from the output messages #1401

Open
opened 2026-02-16 17:30:48 -05:00 by yindo · 16 comments
Owner

Originally created by @JeongJuhyeon on GitHub (Aug 20, 2025).

Originally assigned to: @adamdotdevin on GitHub.

  • Opencode run in Ghostty
  • MacOS 15.5

There does not seem to be any way to select or copy text, both for the input field as well as for the output messages.

Originally created by @JeongJuhyeon on GitHub (Aug 20, 2025). Originally assigned to: @adamdotdevin on GitHub. - Opencode run in Ghostty - MacOS 15.5 There does not seem to be any way to select or copy text, both for the input field as well as for the output messages.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 20, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1886: First column of text not copied - specifically mentions inability to select text visually and copying issues
  • #1992: Text selection highlight for copying messages issues (closed) - related to text selection problems in terminal environments
  • #1771: Ghostty clipboard issues when copying from opencode - specifically mentions problems with text selection and copying in Ghostty
  • #2037: Ghostty mouse highlighting issues - describes problems with text selection behavior in Ghostty specifically

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 20, 2025): This issue might be a duplicate of existing issues. Please check: - #1886: First column of text not copied - specifically mentions inability to select text visually and copying issues - #1992: Text selection highlight for copying messages issues (closed) - related to text selection problems in terminal environments - #1771: Ghostty clipboard issues when copying from opencode - specifically mentions problems with text selection and copying in Ghostty - #2037: Ghostty mouse highlighting issues - describes problems with text selection behavior in Ghostty specifically Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

@JeongJuhyeon does this not work for you?

https://github.com/user-attachments/assets/45c1ac1e-4fe0-450b-9633-214fd069e5d9

@rekram1-node commented on GitHub (Aug 20, 2025): @JeongJuhyeon does this not work for you? https://github.com/user-attachments/assets/45c1ac1e-4fe0-450b-9633-214fd069e5d9
Author
Owner

@JeongJuhyeon commented on GitHub (Aug 20, 2025):

@rekram1-node
It does, though with limitations:

  • What if the part to copy spans longer than the height of the terminal
  • As mentioned, this doesn't work for the input field
@JeongJuhyeon commented on GitHub (Aug 20, 2025): @rekram1-node It does, though with limitations: - What if the part to copy spans longer than the height of the terminal - As mentioned, this doesn't work for the input field
Author
Owner

@jensk commented on GitHub (Aug 20, 2025):

WSL2 user here, only input selection not working. Output selection works fine.

@jensk commented on GitHub (Aug 20, 2025): WSL2 user here, only input selection not working. Output selection works fine.
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

Oh yeah the text select only applies for msgs rn

@rekram1-node commented on GitHub (Aug 20, 2025): Oh yeah the text select only applies for msgs rn
Author
Owner

@jensk commented on GitHub (Aug 20, 2025):

Known limitation, gotcha. Thanks for the quick update!

@jensk commented on GitHub (Aug 20, 2025): Known limitation, gotcha. Thanks for the quick update!
Author
Owner

@av commented on GitHub (Aug 21, 2025):

It appears that "copy on selection" doesn't work on default Gnome terminal in Pop!_OS. After selection is released, the popup is shown: "Copied to clipboard", but the actual clipboard then doesn't have the new data.

@av commented on GitHub (Aug 21, 2025): It appears that "copy on selection" doesn't work on default Gnome terminal in Pop!_OS. After selection is released, the popup is shown: "Copied to clipboard", but the actual clipboard then doesn't have the new data.
Author
Owner

@zach-fuller commented on GitHub (Aug 21, 2025):

I've introduced two PRs to address some of the concerns mentioned here. Feedback is welcome!

#2160 #2158

@zach-fuller commented on GitHub (Aug 21, 2025): I've introduced two PRs to address some of the concerns mentioned here. Feedback is welcome! #2160 #2158
Author
Owner

@septicdank commented on GitHub (Sep 3, 2025):

It appears that "copy on selection" doesn't work on default Gnome terminal in Pop!_OS. After selection is released, the popup is shown: "Copied to clipboard", but the actual clipboard then doesn't have the new data.

It isn't working on debian 13 in terminator for me.
Can we get an option to turn off the highlight to copy?
It seems to be causing a lot of issues for something that is really not necessary.

@septicdank commented on GitHub (Sep 3, 2025): > It appears that "copy on selection" doesn't work on default Gnome terminal in Pop!_OS. After selection is released, the popup is shown: "Copied to clipboard", but the actual clipboard then doesn't have the new data. It isn't working on debian 13 in terminator for me. Can we get an option to turn off the highlight to copy? It seems to be causing a lot of issues for something that is really not necessary.
Author
Owner

@dburkland commented on GitHub (Sep 4, 2025):

I am in the process of trying to migrate my workflows from claude code to opencode and the copy/paste behavior with input and output messages is still a big limitation for me.

@dburkland commented on GitHub (Sep 4, 2025): I am in the process of trying to migrate my workflows from claude code to opencode and the copy/paste behavior with input and output messages is still a big limitation for me.
Author
Owner

@rekram1-node commented on GitHub (Sep 4, 2025):

@dburkland opencode is being migrated to a new tui library: opentui, once this is done I think the text copying issues should be resolved

@rekram1-node commented on GitHub (Sep 4, 2025): @dburkland opencode is being migrated to a new tui library: opentui, once this is done I think the text copying issues should be resolved
Author
Owner

@dburkland commented on GitHub (Sep 4, 2025):

@dburkland opencode is being migrated to a new tui library: opentui, once this is done I think the text copying issues should be resolved

Fantastic, thanks!

@dburkland commented on GitHub (Sep 4, 2025): > [@dburkland](https://github.com/dburkland) opencode is being migrated to a new tui library: opentui, once this is done I think the text copying issues should be resolved Fantastic, thanks!
Author
Owner

@JGKle commented on GitHub (Sep 17, 2025):

Same issue on Konsole->tmux (my actual terminal is Konsole, but I have to use opencode thru tmux because it's broken in konsole per here). When I select text I do see the "Copied to clipboard" message, but nothing is actually copied. Have found no workaround / no way to copy text, which is a critical blocker to moving over from ClaudeCode (I ultimately found myself having to dig through the raw JSON message files to get something into the clipboard)

@JGKle commented on GitHub (Sep 17, 2025): Same issue on Konsole->tmux (my actual terminal is Konsole, but I have to use opencode thru tmux because it's broken in konsole per [here](https://github.com/sst/opencode/issues/1146)). When I select text I do see the "Copied to clipboard" message, but nothing is actually copied. Have found no workaround / no way to copy text, which is a critical blocker to moving over from ClaudeCode (I ultimately found myself having to dig through the raw JSON message files to get something into the clipboard)
Author
Owner

@rekram1-node commented on GitHub (Sep 17, 2025):

this should be better addressed soon but in meantime you could use /export (ik not ideal)

@rekram1-node commented on GitHub (Sep 17, 2025): this should be better addressed soon but in meantime you could use /export (ik not ideal)
Author
Owner

@mikewaters commented on GitHub (Oct 18, 2025):

Here's a one-liner to grab the path to the tempfile that /export pops into $EDITOR:

# run `/export` in opencode then grab another shell:
fd --changed-within 1m conver /private/var/folders
-> /private/var/folders/gk/0l8cgrfj6ws3c2dhq7rxxyq00000gn/T/conversation-2002301606.md
  • uses fd (from here)

I use this command, which assumes I've only done this once in the past minute, and opens the file in Zed (on macos):
fd --changed-within 1m conver /private/var/folders |xargs open -a zed

@mikewaters commented on GitHub (Oct 18, 2025): Here's a one-liner to grab the path to the tempfile that `/export` pops into $EDITOR: ```bash # run `/export` in opencode then grab another shell: fd --changed-within 1m conver /private/var/folders -> /private/var/folders/gk/0l8cgrfj6ws3c2dhq7rxxyq00000gn/T/conversation-2002301606.md ``` - uses `fd` (from [here](https://github.com/sharkdp/fd)) I use this command, which assumes I've only done this once in the past minute, and opens the file in Zed (on macos): `fd --changed-within 1m conver /private/var/folders |xargs open -a zed`
Author
Owner

@Huge commented on GitHub (Jan 2, 2026):

Weirdly I have even set copy-on-selection in Alacritty, but opencode somehow eats it, evading the selection to enter the clipboard. Also fails on WSL terminal when running in byobu.

@Huge commented on GitHub (Jan 2, 2026): Weirdly I have even set copy-on-selection in Alacritty, but opencode somehow eats it, evading the selection to enter the clipboard. Also fails on WSL terminal when running in [byobu](https://www.byobu.org).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1401