GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Can't copy text from opencode through mouse selection in Windows Terminal · Issue #5046 · anomalyco/opencode

Can't copy text from opencode through mouse selection in Windows Terminal #5046

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Can't copy text from opencode through mouse selection in Windows Terminal#5046
Copy link
Assignees
Hona

Description

@tiberiuichim
tiberiuichim
opened on Dec 4, 2025
Issue body actions

Description

I've noticed the newly introduced OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT which I hoped would make it better for me to copy text from opencode tui, but it doesn't work. I run Windows Terminal > wsl > ubuntu > ssh > tmux > opencode. Whenever I mouse-select text that shows up in opencode, the selection is cleared and nothing is copied to the clipboard. Before toggling the flag, it said "copied to clipboard" (which it didn't, who knows, maybe I need a clipboard forward integration or something). Now it doesn't say "copied to clipboard", but it does not copy, it just clears selection. I've tried in a separate windows terminal tab and the behavior is: select text and only after right click the selection is cleared and the clipboard gets that content.

OpenCode version

1.0.132

Steps to reproduce

  1. Run windows terminal with wsl
  2. open opencode via an ssh connection. First set the environment flag
  3. mouse select some text
  4. I expectat that my selection is copied to the clipboard. Instead, the selection is cleared and nothing happens.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Reacted by Michael Mortensen, Davide Fiocco, jrogers512, David Vadas, Sergei Zharinov, Aidan Sunbury, Hendra wijaya, Macjob, seanmamasde, RogerGdot and 4 more

Activity

  1. tiberiuichim
    added
    bugSomething isn't working
    on Dec 4, 2025
  2. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 4, 2025
  3. github-actions commented on Dec 4, 2025

    @github-actions
    github-actionsBot
    on Dec 4, 2025 – with GitHub Actions
    Contributor
    More actions

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

    • Copy To Clipboard is not working #4283: Copy To Clipboard is not working - similar clipboard functionality issue
    • clipboard copy not works in remote SSH console. #2773: clipboard copy not works in remote SSH console - copy not working in remote environments (SSH/WSL)
    • Copy and Paste behaviour under Linux #4754: Copy and Paste behaviour under Linux - related to clipboard handling across different platforms
    • [FEATURE]: Add config option to disable copy-on-select #4751: [FEATURE]: Add config option to disable copy-on-select - the feature request that led to the OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT flag

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

  4. kajeagentspi commented on Jan 10, 2026

    @kajeagentspi
    kajeagentspi
    on Jan 10, 2026
    More actions

    I'm on mac and if I put opencode under tmux I cant copy text as well

  5. wwalker commented on Jan 14, 2026

    @wwalker
    wwalker
    on Jan 14, 2026
    More actions

    I have the same/similar problem running on linux in an XTerm. Usually it is xterm -> ssh -> tmux -> opencode, but to troubleshoot I an running directly local using XTerm with opencode in it.

    1. double click (select by word) and triple click (select by line) never highlight anything. Something is often in the clipboard, but rarely the thing I was trying to select.
    2. click and drag (select by character) seems to work but opencode is adding newline that aren't there to the selection before putting it in the clipboard.
    Reacted by Andrey E. Yaromenok and nweiler
  6. mhrf commented on Jan 17, 2026

    @mhrf
    mhrf
    on Jan 17, 2026
    More actions

    Until they fix the code to not clear selection, you can shift+mouse drag, this way it wont clear the selection. Then you can copy to clipboard ctrl+c normally. (works in GhosTTY)

    Reacted by Jean-Baptiste Mestelan, Hermann Rolfes and Enes Kirimi
    Reacted by Aidan Sunbury, Robin Björklin, Tiberiu Ichim, Paul Maxwell and tom-jadeai
    Reacted by Khaled Ferjani, torryt, YiHong Chen, Michael Mortensen, Jacob Vanus, Wei, Daniel Macías Gómez, Leni_v, Arthur Drozdov, Daniel Katson and 10 more
  7. zioalex commented on Feb 23, 2026

    @zioalex
    zioalex
    on Feb 23, 2026
    More actions

    Same problem in Linux. It can copy but only inside Opencode itself

  8. mamorett commented on Mar 1, 2026

    @mamorett
    mamorett
    on Mar 1, 2026
    More actions

    same here. I am using opencode in an headless Spark DGX and I cannot copy paste anything within opencode itself.

  9. EddyVinck commented on Apr 19, 2026

    @EddyVinck
    EddyVinck
    on Apr 19, 2026
    More actions

    Until they fix the code to not clear selection, you can shift+mouse drag, this way it wont clear the selection. Then you can copy to clipboard ctrl+c normally. (works in GhosTTY)

    thank you, that worked for me on Mac using OpenCode in Cmux

  10. Daniel15 commented on Apr 22, 2026

    @Daniel15
    Daniel15
    on Apr 22, 2026
    More actions

    It seems terminal dependent. Copy on select works fine in the terminal in VS Code, and in Konsole (KDE's default terminal), but not GNOME Terminal. I suspect there's some terminal-specific capability that it should be checking for.

    You can set the environment variable OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT to 1 to disable copy on select. This will retain the selection, and then you can press Ctrl+C like normal.
    Sorry, I didn't see you already mentioned this.

  11. thdxr
    assigned
    Hona
    on May 3, 2026
  12. thdxr
    removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  13. emsi commented on May 8, 2026

    @emsi
    emsi
    on May 8, 2026
    More actions

    No properly behaving terminal application depends on external tools for text selection and copy. On X11 no-one even needs to "copy" as selected text is immediately available for being pasted. opencode is completely broken, does not work over remote session, inside container etc. It generally is misbehaving application that damages your terminal and should be avoided.

  14. Samfaitmal commented on Jun 11, 2026

    @Samfaitmal
    Samfaitmal
    on Jun 11, 2026
    More actions

    I am using mobaxterm as terminal. I've found a workaround by disabling mouse capturing in TUI -
    ~/.config/opencode/tui.json:

    {
      "$schema": "https://opencode.ai/tui.json",
      "mouse": false
    }
    
    Reacted by Milko Madariaga and AYMEN
  15. github-actions commented on Aug 11, 2026

    @github-actions
    github-actionsBot
    on Aug 11, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  16. github-actions
    closed this as not plannedon Aug 11, 2026
  17. xibsked commented on Aug 19, 2026

    @xibsked
    xibsked
    on Aug 19, 2026
    More actions

    This is really making the use in vs code in web very difficult. I cannot select the text at all. When I set mouse to false in tui, all scroll stops. And even then the copy is not working at all.

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

Metadata

Metadata

Assignees

  • @Hona
    Hona

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.