Skip to content

I can't paste text with CTRL+V or right mouse click when running inside WSL #3081

Closed

Description

@dliedke

When running opencode inside WSL, I can't paste text with CTRL+V or right mouse click. The only option that works is in the menu

Image

Activity

  1. github-actions commented on Oct 10, 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. self-assigned this
    on Oct 10, 2025
  3. rekram1-node commented on Oct 10, 2025

    @rekram1-node
    Contributor

    @dliedke can u try: Ctrl-Shift-V

  4. dliedke commented on Oct 10, 2025

    @dliedke
    Author

    Did not work. Not even WIN+V and paste with Windows clipboard.

    Right click works with any coding agent inside WSL except opencode.

  5. rekram1-node commented on Oct 10, 2025

    @rekram1-node
    Contributor

    Hm okay thx for raising, we will look into this cc @itsrainingmani

  6. dliedke commented on Oct 10, 2025

    @dliedke
    Author

    Thanks, really appreciate it. I plan to integrate opencode into my Claude Code Visual Studio extension once the paste is fixed.

  7. dliedke commented on Oct 29, 2025

    @dliedke
    Author

    Retested in version v0.15.26 and not working. Even in more than one machine. It is a software bug.

  8. dliedke commented on Oct 29, 2025

    @dliedke
    Author

    It works for Claude Code, Codex and Cursor. Right click should paste the text inside WSL. Thank you!

  9. althafdemiandra commented on Nov 2, 2025

    @althafdemiandra
    Contributor

    ctrl + v and paste from raycast worked for me for text in v1.0.10 with windows terminal + wsl arch
    whats still bugging for me is unability to paste a photo/image/attachment into text input

  10. 4 remaining items

  11. SebastienGllmt commented on Dec 17, 2025

    @SebastienGllmt

    I ran into the same issue, and ctrl+shift+v worked for me (even though regular ctrl+v doesn't work) when using Windows Terminal

  12. gliatti commented on Dec 20, 2025

    @gliatti

    ctrl+shift+v and ctrl+v still does not work... v1.0.174

  13. ironbelly commented on Dec 23, 2025

    @ironbelly

    Putting this here for anyone else searching this issue like I was: I installed xsel and then if I am holding shift and selecting the text I am able to paste what I selected with right click.. Without shift, it doesn't work. Not sure if xsel is key here or not as I haven't tried without it.

  14. dliedke commented on Dec 23, 2025

    @dliedke
    Author

    Yes, tested with and witout xsel, it works with SHIFT+right click to paste clipboard content from Windows to Wsl. Thanks a lot!

  15. Simplereally commented on Jan 19, 2026

    @Simplereally

    CTRL+V still doesn't work

  16. BillGaici20230401 commented on Jan 21, 2026

    @BillGaici20230401

    My opencode is version 1.1.25, and I am currently using PowerShell on Windows 10 to open the opencode CLI. I have tried all methods, but I still cannot paste clipboard content.

  17. pdeswardt commented on Jan 21, 2026

    @pdeswardt

    1.1.28 - also still not able to paste images ( text works with CTRL+V )

  18. LaughterOnWater commented on Jan 21, 2026

    @LaughterOnWater

    Apparently this has been resolved with text for 1.1.28 for text, so this confirms @pdeswardt's results. I'm now about to use CTRL+V+right-click when using powershell wsl kali-linux in a separate command line not attached to VSCode. @BillGaici20230401 this is what I did to upgrade:

    ┌──(chris㉿Cetacean)-[/mnt/e/coding/work/dev]
    └─$ sudo opencode upgrade
    [sudo] password for chris:
    
                                       ▄
      █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
      █░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀
      ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀  ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀
    
    ┌  Upgrade
    │
    ●  Using method: npm
    │
    ●  From 1.1.27 → 1.1.28
    │
    ◇  Upgrade complete
    │
    └  Done
  19. opti21 commented on Feb 11, 2026

    @opti21

    1.1.28 - also still not able to paste images ( text works with CTRL+V )

    Still not able to with 1.1.56 wsl Ubuntu - windows terminal, text does work. One suspicion is that it may not understand the file location since I'm copying it from the Windows filesystem. I notice other cli tools convert it to /mnt/c

  20. khush-2106 commented on Feb 11, 2026

    @khush-2106

    have you guys tried shift + insert for pasting and shift + del for copying, I think that should work

  21. johnnyshields commented on Feb 23, 2026

    @johnnyshields

    Issue should be re-opened.

    On WSL, the copy-paste mechanics are a deal-breaker for me 😢

    Here's what I see on WSL:

    # Action Result
    1 Left-click select-drag and release to copy Copies and deselects text. Undesirable. Would be better if selected text stayed selected, and copying could be done by #2 and #3 below instead.
    2 Left-click select-drag and while holding, Right-click copy Does not work; deselects text (correct) but does not copy to clipboard
    3 Left-click select-drag, release to select THEN Right-click to copy Does not work because after left-click, the text is deselected as per #1
    3 Ctrl+C to copy Ctrl+C clears the textbox, so does not work. Would be ideal if text is selected then Ctrl+C does a copy.
    4 Ctrl+V to paste Works!
    5 Right-click to paste Does not work. Really, really wish this worked.
    6 Shift + Right-click to paste Works, but would be better if we did #5
  22. jax0m commented on Mar 7, 2026

    @jax0m

    Testing this myself and the same conditions seem to exist outside of WSL, likely something to do with the UI handling. Confirming that CTRL+Shift+V does work for paste, so thanks to all whom have mentioned this tip though isnt a combination I think I had tried in windows yet. Learn something new everyday ;)

  23. xmontero commented on Apr 6, 2026

    @xmontero

    For me as of 6-apr-2026:

    Version

    ubuntu@devel-sf7:/files/repos$ opencode --version
    1.3.17
    ubuntu@devel-sf7:/files/repos$
    

    Setup

    Win 11, WSL2, docker desktop running in WSL2, inside the docker, a container based on ubuntu, controlled by a "bash" inside the ubuntu.

    From INSIDE the ubuntu:

    ubuntu@devel-sf7:/files/repos$ cat /etc/issue
    Ubuntu 24.04.2 LTS \n \l
    
    ubuntu@devel-sf7:/files/repos$ uname -a
    Linux devel-sf7 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
    ubuntu@devel-sf7:/files/repos$ bash --version
    GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    
    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    ubuntu@devel-sf7:/files/repos$
    

    Terminal to control that bash inside ubuntu, I use the native bash windows terminal:

    C:\Windows\System32\bash.exe -c /files/bin/xxxxxxxxxxxxxx.sh # xxxx is a script with docker exec etc, etc.
    

    FROM INSIDE CMD in windows:

    C:\Windows\System32>bash.exe --version
    GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    
    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    C:\Windows\System32>
    

    Tests

    With all this setup these are the results:

    Test Setup => In windows, in notepad I type random text, select and CTRL+C

    Then, inside the bash inside ubuntu inside the container inside the docker inside the WSL2 inside the windows, controlled by the native bash in windows:

    Inside ClaudeCode

    Right click => 🟩 pastes!!!
    Ctrl + Right click => 🟩 pastes!!!
    Shift + Right click => 🟩 pastes!!!
    Alt + Right click => 🟩 pastes!!!
    Ctrl + Shift + Right click => 🟩 pastes!!!
    Ctrl + Alt + Right click => 🟩 pastes!!!
    Alt + Shift + right click => 🟩 pastes!!!
    Ctrl + Alt + Shift + right click => 🟩 pastes!!!
    v => 🟩 writes v
    Shift + v => 🟩 writes V
    Ctrl + v => 🟨 It appears the text "No image found in clipboard. Use ctrl+v to paste images."
    Alt + v => 🟥 nothing happens
    Shift + Ctrl + v => 🟨 It appears the text "No image found in clipboard. Use ctrl+v to paste images."
    Ctrl + Alt + v => 🟥 nothing happens
    Alt + Shift + v => 🟥 nothing happens
    Ctrl + Alt + Shift + v => 🟥 nothing happens
    Menu top-left in the window manager "Edit / Paste (Ctrl+V)" => 🟩 pastes!!!
    Shift+Ins => 🟥 nothing happens

    Inside OpenCode

    Right click => 🟥 nothing happens
    Ctrl + Right click => 🟥 nothing happens
    Shift + Right click => 🟩 pastes!!!
    Alt + Right click => 🟥 nothing happens
    Ctrl + Shift + Right click => 🟩 pastes!!!
    Ctrl + Alt + Right click => 🟥 nothing happens
    Alt + Shift + right click => 🟩 pastes!!!
    Ctrl + Alt + Shift + right click => 🟩 pastes!!!
    v => 🟩 writes v
    Shift + v => 🟩 writes V
    Ctrl + v => 🟥 nothing happens
    Alt + v => 🟥 nothing happens
    Shift + Ctrl + v => 🟥 nothing happens
    Ctrl + Alt + v => 🟥 nothing happens
    Alt + Shift + v => 🟥 nothing happens
    Ctrl + Alt + Shift + v => 🟥 nothing happens
    Menu top-left in the window manager "Edit / Paste (Ctrl+V)" => 🟩 pastes!!!
    Shift+Ins => 🟥 nothing happens

    If it helps, the only missing thing, it would be to do not have to press "shift" for pasting. I'd be happy even if that's not the default and I am able to configure it somwhow.

    It seems a silly thing but, truly, OpenCode's paste is a disruption on how all the 99.999999% terminal applications work and breaks the user experience.

    May I help?

  24. carudevrd commented on May 12, 2026

    @carudevrd

    WSL, Work! Version 1.14.48. Only push CTRL+SHIFT+V+Right click command = Paste!!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions