opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Attachements do not work on WSL

Open tmn73 opened this issue 1 year ago • 12 comments

I'm sure this is not a priority, but just letting you guys know attachements dont work in WSL. When I paste an image for example, nothing is happening. If I point to a file on windows ex C:\Users\xxx\Pictures\Screenshots\image.png it says "I can't access the file at that Windows path from this Linux environment."

I will try to work on a PR

tmn73 avatar Jul 21 '25 20:07 tmn73

any updates on this?

ak127a avatar Aug 26 '25 19:08 ak127a

@itsrainingmani

rekram1-node avatar Sep 24 '25 02:09 rekram1-node

What terminal are you using. I'm using wezterm and facing the same issue.

Might need an image renderer

sai-sy avatar Sep 30 '25 14:09 sai-sy

The main issue here (clipboard image paste in WSL) was fixed in Nov 2025 via PR #4123. If you're on a recent version, Ctrl+V image paste should work.

For the Windows path issue (C:\Users\... not being recognized), there's an open PR #8209 that adds automatic path conversion. In the meantime, you can manually convert paths:

  • C:\Users\tommy\image.png → /mnt/c/Users/tommy/image.png

Closing as the core functionality is fixed. Thanks for the report!

R44VC0RP avatar Jan 25 '26 18:01 R44VC0RP

@R44VC0RP is the fix there only for a specific terminal emulator (i.e. wezterm)?

I'm on latest opencode and Windows Terminal and image paste doesn't work

amirasyraf avatar Feb 18 '26 09:02 amirasyraf

@R44VC0RP is the fix there only for a specific terminal emulator (i.e. wezterm)?

I'm on latest opencode and Windows Terminal and image paste doesn't work

The same.

Yousa-Mirage avatar Feb 24 '26 16:02 Yousa-Mirage

+1

turazashvili avatar Mar 04 '26 02:03 turazashvili

+1

lwkrakowai-maker avatar Apr 08 '26 18:04 lwkrakowai-maker

+1

FilJed avatar Apr 10 '26 13:04 FilJed

The fix is:

{
  "$schema": "https://opencode.ai/config.json",
  "keybinds": {
    "input_paste": "alt+v"
  }
}

in your opencode config

Thanks to dansan92: https://github.com/anomalyco/opencode/issues/1429#issuecomment-3883607598

amirasyraf avatar Apr 10 '26 23:04 amirasyraf

"input_paste": "alt+v"

Confirm it's working. Thank you!

FilJed avatar Apr 12 '26 11:04 FilJed

awesome, works great!

On Sun, Apr 12, 2026 at 6:52 AM FilJed @.***> wrote:

FilJed left a comment (anomalyco/opencode#1202) https://github.com/anomalyco/opencode/issues/1202#issuecomment-4231444667

"input_paste": "alt+v"

Confirm it's working. Thank you!

— Reply to this email directly, view it on GitHub https://github.com/anomalyco/opencode/issues/1202#issuecomment-4231444667, or unsubscribe https://github.com/notifications/unsubscribe-auth/BYNS5TMW7EZD3O5VMZLGDIT4VN7QLAVCNFSM6AAAAACCA5NIJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMZRGQ2DINRWG4 . You are receiving this because you commented.Message ID: @.***>

lwkrakowai-maker avatar Apr 14 '26 15:04 lwkrakowai-maker