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

Closed
opened 2026-02-16 17:33:50 -05:00 by yindo · 22 comments
Owner

Originally created by @dliedke on GitHub (Oct 10, 2025).

Originally assigned to: @rekram1-node on GitHub.

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
Originally created by @dliedke on GitHub (Oct 10, 2025). Originally assigned to: @rekram1-node on GitHub. 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 <img width="466" height="445" alt="Image" src="https://github.com/user-attachments/assets/f2f89f7b-4408-4df6-99ad-cd70f1934e4e" />
yindo added the windowshelp-wantedbug labels 2026-02-16 17:33:50 -05:00
yindo closed this issue 2026-02-16 17:33:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 10, 2025):

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

  • #2878: Pasting images doesn't work on WSL2 Wezterm (similar WSL paste issues with Ctrl+V)
  • #1202: Attachements do not work on WSL (general WSL paste/attachment problems)
  • #2948: copy-paste does not work (general paste functionality issues - closed)
  • #909: Can't Paste content from clipboard (Ctrl+V not working - closed)

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

@github-actions[bot] commented on GitHub (Oct 10, 2025): This issue might be a duplicate of existing issues. Please check: - #2878: Pasting images doesn't work on WSL2 Wezterm (similar WSL paste issues with Ctrl+V) - #1202: Attachements do not work on WSL (general WSL paste/attachment problems) - #2948: copy-paste does not work (general paste functionality issues - closed) - #909: Can't Paste content from clipboard (Ctrl+V not working - closed) Feel free to ignore if none of these address your specific case.
Author
Owner

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

@dliedke can u try: Ctrl-Shift-V

@rekram1-node commented on GitHub (Oct 10, 2025): @dliedke can u try: Ctrl-Shift-V
Author
Owner

@dliedke commented on GitHub (Oct 10, 2025):

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

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

@dliedke commented on GitHub (Oct 10, 2025): Did not work. Not even WIN+V and paste with Windows clipboard. Right click works with any coding agent inside WSL except opencode.
Author
Owner

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

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

@rekram1-node commented on GitHub (Oct 10, 2025): Hm okay thx for raising, we will look into this cc @itsrainingmani
Author
Owner

@dliedke commented on GitHub (Oct 10, 2025):

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

@dliedke commented on GitHub (Oct 10, 2025): Thanks, really appreciate it. I plan to integrate opencode into my Claude Code Visual Studio extension once the paste is fixed.
Author
Owner

@ghost commented on GitHub (Oct 29, 2025):

so idk if this is fixed?, but maybe try restarting your pc , using another terminal , replugging your keyboard. anything, or its a software bug

@ghost commented on GitHub (Oct 29, 2025): so idk if this is fixed?, but maybe try restarting your pc , using another terminal , replugging your keyboard. anything, or its a software bug
Author
Owner

@dliedke commented on GitHub (Oct 29, 2025):

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

@dliedke commented on GitHub (Oct 29, 2025): Retested in version v0.15.26 and not working. Even in more than one machine. It is a software bug.
Author
Owner

@dliedke commented on GitHub (Oct 29, 2025):

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

@dliedke commented on GitHub (Oct 29, 2025): It works for Claude Code, Codex and Cursor. Right click should paste the text inside WSL. Thank you!
Author
Owner

@althafdemiandra commented on GitHub (Nov 2, 2025):

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

@althafdemiandra commented on GitHub (Nov 2, 2025): 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
Author
Owner

@dliedke commented on GitHub (Nov 2, 2025):

I tested opencode v1.0.11 in WSL (Windows 11 25H2) and paste with CTRL+V or right mouse click is still not working. If I select a text in opencode then it is copied to the clipboard. But pasting is still not working.

@dliedke commented on GitHub (Nov 2, 2025): I tested opencode v1.0.11 in WSL (Windows 11 25H2) and paste with CTRL+V or right mouse click is still not working. If I select a text in opencode then it is copied to the clipboard. But pasting is still not working.
Author
Owner

@dliedke commented on GitHub (Nov 2, 2025):

I tried here with Claude Code with no luck.

The Real Problem

The paste issue you're experiencing with bun dev is a known bug in opentui itself, not in the Go input code:
Issue #3397: Multi-line paste with Ctrl+Shift+V pastes as single line; Ctrl+V doesn't work
Issue #3343: Pasting multi-line snippets in Windows Terminal fails
Issue #3081: The issue you asked me to fix (WSL paste)

All three are the same underlying opentui bug affecting Windows, WSL, and various Linux terminals.

Recent opentui Fixes
PR #239 (merged Oct 27): "Pass Paste Event Instead of Just Pasted Text" - changed how paste events are handled
Version 0.1.32 (published Nov 2): Should include the paste fix, but apparently it's not complete

Solutions
Option 1: Report to opentui team The paste bug needs to be fixed in opentui itself. Even though v0.1.32 includes PR #239, the issue persists. Option 2: Wait for the next opentui release The team is aware and actively working on paste-related issues. Option 3: Use the Edit -> Paste menu workaround You mentioned this works - it uses Clipboard.read() directly instead of relying on bracketed paste events.

@dliedke commented on GitHub (Nov 2, 2025): I tried here with Claude Code with no luck. The Real Problem The paste issue you're experiencing with bun dev is a known bug in opentui itself, not in the Go input code: Issue [#3397](https://github.com/sst/opencode/issues/3397): Multi-line paste with Ctrl+Shift+V pastes as single line; Ctrl+V doesn't work Issue [#3343](https://github.com/sst/opencode/issues/3343): Pasting multi-line snippets in Windows Terminal fails Issue [#3081](https://github.com/sst/opencode/issues/3081): The issue you asked me to fix (WSL paste) All three are the same underlying opentui bug affecting Windows, WSL, and various Linux terminals. Recent opentui Fixes PR #239 (merged Oct 27): "Pass Paste Event Instead of Just Pasted Text" - changed how paste events are handled Version 0.1.32 (published Nov 2): Should include the paste fix, but apparently it's not complete Solutions Option 1: Report to opentui team The paste bug needs to be fixed in opentui itself. Even though v0.1.32 includes PR #239, the issue persists. Option 2: Wait for the next opentui release The team is aware and actively working on paste-related issues. Option 3: Use the Edit -> Paste menu workaround You mentioned this works - it uses Clipboard.read() directly instead of relying on bracketed paste events.
Author
Owner

@LaughterOnWater commented on GitHub (Dec 3, 2025):

Still an issue - Opencode 1.0.129, Windows 10, wsl kali-linux, ctrl-v, ctrl-shft-v, right-click over cursor... :/

@LaughterOnWater commented on GitHub (Dec 3, 2025): Still an issue - Opencode 1.0.129, Windows 10, wsl kali-linux, ctrl-v, ctrl-shft-v, right-click over cursor... :/
Author
Owner

@SebastienGllmt commented on GitHub (Dec 16, 2025):

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

@SebastienGllmt commented on GitHub (Dec 16, 2025): 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
Author
Owner

@gliatti commented on GitHub (Dec 20, 2025):

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

@gliatti commented on GitHub (Dec 20, 2025): ctrl+shift+v and ctrl+v still does not work... v1.0.174
Author
Owner

@ironbelly commented on GitHub (Dec 23, 2025):

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.

@ironbelly commented on GitHub (Dec 23, 2025): 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.
Author
Owner

@dliedke commented on GitHub (Dec 23, 2025):

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

@dliedke commented on GitHub (Dec 23, 2025): Yes, tested with and witout xsel, it works with SHIFT+right click to paste clipboard content from Windows to Wsl. Thanks a lot!
Author
Owner

@Simplereally commented on GitHub (Jan 19, 2026):

CTRL+V still doesn't work

@Simplereally commented on GitHub (Jan 19, 2026): CTRL+V still doesn't work
Author
Owner

@BillGaici20230401 commented on GitHub (Jan 20, 2026):

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.

@BillGaici20230401 commented on GitHub (Jan 20, 2026): 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.
Author
Owner

@pdeswardt commented on GitHub (Jan 21, 2026):

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

@pdeswardt commented on GitHub (Jan 21, 2026): 1.1.28 - also still not able to paste images ( text works with CTRL+V )
Author
Owner

@LaughterOnWater commented on GitHub (Jan 21, 2026):

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
@LaughterOnWater commented on GitHub (Jan 21, 2026): 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: ```PS E:\coding\work\dev> wsl -d kali-linux ┌──(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 ```
Author
Owner

@opti21 commented on GitHub (Feb 10, 2026):

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

@opti21 commented on GitHub (Feb 10, 2026): > 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
Author
Owner

@khush-2106 commented on GitHub (Feb 11, 2026):

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

@khush-2106 commented on GitHub (Feb 11, 2026): have you guys tried shift + insert for pasting and shift + del for copying, I think that should work
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2033