How to disable text selection and clipboard overrides? #1872

Open
opened 2026-02-16 17:33:01 -05:00 by yindo · 7 comments
Owner

Originally created by @agladysh on GitHub (Sep 28, 2025).

Originally assigned to: @adamdotdevin on GitHub.

I find what opencode does with text selection and clipboard in my terminal extremely disruptive for my work process.

I would like to be able to use my OS and terminal facilities directly to select and copy from opencode, ideally, with full scrollback buffer for longer texts.

Is there an option to disable the current behavior?

Originally created by @agladysh on GitHub (Sep 28, 2025). Originally assigned to: @adamdotdevin on GitHub. I find what opencode does with text selection and clipboard in my terminal extremely disruptive for my work process. I would like to be able to use my OS and terminal facilities directly to select and copy from opencode, ideally, with full scrollback buffer for longer texts. Is there an option to disable the current behavior?
Author
Owner

@github-actions[bot] commented on GitHub (Sep 28, 2025):

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

  • #106: Option to not use alternate (fullscreen) screen mode - requests the ability to not use alternate screen mode to allow users to use their terminal emulator's scrolling, searching, and copying functionality
  • #2755: feat: Copy Mode for OpenCode - comprehensive request for better text selection and copying functionality, addressing the limitations of current mouse-dependent selection
  • #2118: Add a /copy command to copy latest message (or allow scrolling while selecting text) - specifically mentions the auto-copy behavior being annoying and requests better text selection controls
  • #1210: Mouse text selection has unexpected behavior in terminal - addresses issues with current text selection behavior differing from standard terminal applications like vim, tmux, and less

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

@github-actions[bot] commented on GitHub (Sep 28, 2025): This issue might be a duplicate of existing issues. Please check: - #106: Option to not use alternate (fullscreen) screen mode - requests the ability to not use alternate screen mode to allow users to use their terminal emulator's scrolling, searching, and copying functionality - #2755: feat: Copy Mode for OpenCode - comprehensive request for better text selection and copying functionality, addressing the limitations of current mouse-dependent selection - #2118: Add a /copy command to copy latest message (or allow scrolling while selecting text) - specifically mentions the auto-copy behavior being annoying and requests better text selection controls - #1210: Mouse text selection has unexpected behavior in terminal - addresses issues with current text selection behavior differing from standard terminal applications like vim, tmux, and less Feel free to ignore if none of these address your specific case.
Author
Owner

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

@agladysh currently the text copy leaves a lot to be desired, luckily the tui is currently being rewritten and almost complete! once that is done I think this should be addressed much better

Is there an option to disable the current behavior?

don't think so

@rekram1-node commented on GitHub (Sep 28, 2025): @agladysh currently the text copy leaves a lot to be desired, luckily the tui is currently being rewritten and almost complete! once that is done I think this should be addressed much better > Is there an option to disable the current behavior? don't think so
Author
Owner

@agladysh commented on GitHub (Sep 28, 2025):

Please, no "much better", just leave me the exact system functionality my reflexes are honed to by decades of use

@agladysh commented on GitHub (Sep 28, 2025): Please, no "much better", just leave me the exact system functionality my reflexes are honed to by decades of use
Author
Owner

@gardner commented on GitHub (Oct 8, 2025):

I am looking forward to the new version!

I am running opencode in a docker container. The current functionality prevents copy / paste from working as expected as opencode copies the text into the buffer of the docker container, not the host system.

@gardner commented on GitHub (Oct 8, 2025): I am looking forward to the new version! I am running `opencode` in a docker container. The current functionality prevents copy / paste from working as expected as `opencode` copies the text into the buffer of the docker container, not the host system.
Author
Owner

@rekram1-node commented on GitHub (Oct 8, 2025):

does it work if u do (this allows you to test next version):
bun x opencode-ai@opentui

@rekram1-node commented on GitHub (Oct 8, 2025): does it work if u do (this allows you to test next version): bun x opencode-ai@opentui
Author
Owner

@gardner commented on GitHub (Oct 9, 2025):

Awesome! I'll keep testing it out. Hot take is:

It's a bit slow to startup on my machine, which may be due to an mcp server initialization.

  • I can't copy anything off the home screen
  • The selection is cleared during redraws, which prevents copying from a session.
  • After a prompt finishes successfully, it returns to the home screen (see screenshot)
  • If I press escape to stop a prompt and try to select text then it pops up a "Message Actions" dialog asking if I want to revert or "Fork"

Message Actions

Image

Home Screen

Image

--

Can I run it from a branch in the git repo to get the latest merges?

Thanks

@gardner commented on GitHub (Oct 9, 2025): Awesome! I'll keep testing it out. Hot take is: It's a bit slow to startup on my machine, which may be due to an [mcp](https://github.com/BeehiveInnovations/zen-mcp-server) server initialization. - I can't copy anything off the home screen - The selection is cleared during redraws, which prevents copying from a session. - After a prompt finishes successfully, it returns to the home screen (see screenshot) - If I press escape to stop a prompt and try to select text then it pops up a _"Message Actions"_ dialog asking if I want to revert or "Fork" ### Message Actions ![Image](https://github.com/user-attachments/assets/738a8dc1-92de-4a96-9edc-81ef135ad9d5) ### Home Screen ![Image](https://github.com/user-attachments/assets/02f226b3-98e4-461e-9403-2027823bd31b) -- Can I run it from a branch in the git repo to get the latest merges? Thanks
Author
Owner

@rekram1-node commented on GitHub (Oct 9, 2025):

I think everytime u run the command it grabs the latest one, there is a snapshot on every push i think

still wip

@rekram1-node commented on GitHub (Oct 9, 2025): I think everytime u run the command it grabs the latest one, there is a snapshot on every push i think still wip
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1872