Skip to content

How to disable text selection and clipboard overrides? #2845

Closed

Description

@agladysh

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?

Activity

  1. github-actions commented on Sep 28, 2025

    @github-actions
    Contributor

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

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

  2. rekram1-node commented on Sep 29, 2025

    @rekram1-node
    Contributor

    @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

  3. agladysh commented on Sep 29, 2025

    @agladysh
    Author

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

  4. gardner commented on Oct 9, 2025

    @gardner

    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.

  5. rekram1-node commented on Oct 9, 2025

    @rekram1-node
    Contributor

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

  6. gardner commented on Oct 10, 2025

    @gardner

    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

  7. rekram1-node commented on Oct 10, 2025

    @rekram1-node
    Contributor

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

    still wip

  8. CarloWood commented on Mar 14, 2026

    @CarloWood
    Contributor

    @rekram1-node wrote:

    @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 that still being worked on?
    If it is already available, then why is this issue still open?

  9. SQLServerIO commented on Mar 16, 2026

    @SQLServerIO

    I'm in the same boat I use tmux and opencode's copy just doesn't work with tmux and I'm not going to change how tmux handles selecting so please just add a config to disable copy to clipboard on select.

  10. CarloWood commented on Mar 16, 2026

    @CarloWood
    Contributor

    @SQLServerIO I created and am using this: https://github.com/CarloWood/opencode/tree/CW03-toggle-mouse-handling

    with

    {
      "disable_mouse": false,
      "keybinds": {
        "mouse_toggle": "f6"
      }
    }
    

    in $XDG_CONFIG_HOME/opencode/tui.json

  11. CarloWood commented on Mar 16, 2026

    @CarloWood
    Contributor

    By pressing f6 you can toggle between mouse handling by your terminal or by opencode.

  12. pokulo commented on Jul 31, 2026

    @pokulo

    OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT=true and adapted keybindings in tui.json appear to be the current state, see #4996

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

Metadata

Metadata

Assignees

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