[WSL][tmux] opencode cannot copy text in WSL tmux #7257

Closed
opened 2026-02-16 18:06:36 -05:00 by yindo · 7 comments
Owner

Originally created by @FurryWolfX on GitHub (Jan 22, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

[WSL][tmux] opencode cannot copy text in WSL tmux

Plugins

no

OpenCode version

1.1.32

Steps to reproduce

  1. run wsl (Windows Terminal)
  2. run tmux
  3. run opencode
  4. select text (show "Copied to clipboard")
  5. paste

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @FurryWolfX on GitHub (Jan 22, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description [WSL][tmux] opencode cannot copy text in WSL tmux ### Plugins no ### OpenCode version 1.1.32 ### Steps to reproduce 1. run wsl (Windows Terminal) 2. run tmux 3. run opencode 4. select text (show "Copied to clipboard") 5. paste ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the windowsopentuibug labels 2026-02-16 18:06:36 -05:00
yindo closed this issue 2026-02-16 18:06:36 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

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

  • #5879: Clipboard copy in WSL - similar WSL clipboard issues with copy functionality
  • #7297: CLI input issues on WSL Ubuntu: no multiline input and copy/paste not working - covers WSL copy/paste problems
  • #9999: [Bug] Clipboard functionality fails in WSL environment due to missing Windows executable paths - detailed analysis of WSL clipboard failures
  • #9942: Copy-on-Select fails when running opencode via Tmux in Kitty terminal (Linux) - tmux-specific copy issues
  • #4283: Copy To Clipboard is not working - general clipboard copy failures across different environments

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

@github-actions[bot] commented on GitHub (Jan 22, 2026): This issue might be a duplicate of existing issues. Please check: - #5879: Clipboard copy in WSL - similar WSL clipboard issues with copy functionality - #7297: CLI input issues on WSL Ubuntu: no multiline input and copy/paste not working - covers WSL copy/paste problems - #9999: [Bug] Clipboard functionality fails in WSL environment due to missing Windows executable paths - detailed analysis of WSL clipboard failures - #9942: Copy-on-Select fails when running opencode via Tmux in Kitty terminal (Linux) - tmux-specific copy issues - #4283: Copy To Clipboard is not working - general clipboard copy failures across different environments Feel free to ignore if none of these address your specific case.
Author
Owner

@EdyTheCow commented on GitHub (Jan 23, 2026):

Since you're using tmux, a hacky way to workaround this is by using tmux scroll mode CTRL + B [. While in scroll mode, you'll be able to select and copy the text anywhere in the terminal.

@EdyTheCow commented on GitHub (Jan 23, 2026): Since you're using tmux, a hacky way to workaround this is by using tmux scroll mode `CTRL + B` `[`. While in scroll mode, you'll be able to select and copy the text anywhere in the terminal.
Author
Owner

@FurryWolfX commented on GitHub (Jan 23, 2026):

I found a way to solve this problem:

edit ~/.tmux.conf

set -g set-clipboard on
set -g allow-passthrough all
@FurryWolfX commented on GitHub (Jan 23, 2026): I found a way to solve this problem: edit `~/.tmux.conf` ``` set -g set-clipboard on set -g allow-passthrough all ```
Author
Owner

@rudironsoni commented on GitHub (Jan 24, 2026):

I found a way to solve this problem:

edit ~/.tmux.conf

set -g set-clipboard on
set -g allow-passthrough all

🎯

@rudironsoni commented on GitHub (Jan 24, 2026): > I found a way to solve this problem: > > edit `~/.tmux.conf` > > ``` > set -g set-clipboard on > set -g allow-passthrough all > ``` 🎯
Author
Owner

@RodriMora commented on GitHub (Feb 3, 2026):

I found a way to solve this problem:

edit ~/.tmux.conf

set -g set-clipboard on
set -g allow-passthrough all

for me what worked was:

# Let applications inside tmux send OSC sequences (incl. OSC 52 clipboard) to the terminal
set -g allow-passthrough on

# Enable tmux clipboard integration (OSC 52)
set -g set-clipboard on
@RodriMora commented on GitHub (Feb 3, 2026): > I found a way to solve this problem: > > edit `~/.tmux.conf` > > ``` > set -g set-clipboard on > set -g allow-passthrough all > ``` for me what worked was: ``` # Let applications inside tmux send OSC sequences (incl. OSC 52 clipboard) to the terminal set -g allow-passthrough on # Enable tmux clipboard integration (OSC 52) set -g set-clipboard on ```
Author
Owner

@MoshPitCodes commented on GitHub (Feb 3, 2026):

I found a way to solve this problem:
edit ~/.tmux.conf

set -g set-clipboard on
set -g allow-passthrough all

for me what worked was:

# Let applications inside tmux send OSC sequences (incl. OSC 52 clipboard) to the terminal
set -g allow-passthrough on

# Enable tmux clipboard integration (OSC 52)
set -g set-clipboard on

I will try that since I've been running into this issue at least since 1.1.42 and just didn't use tmux at all. It's weird though because copying from/to other applications inside tmux on WSL works fine.

@MoshPitCodes commented on GitHub (Feb 3, 2026): > > I found a way to solve this problem: > > edit `~/.tmux.conf` > > ``` > > set -g set-clipboard on > > set -g allow-passthrough all > > ``` > > for me what worked was: > > ``` > # Let applications inside tmux send OSC sequences (incl. OSC 52 clipboard) to the terminal > set -g allow-passthrough on > > # Enable tmux clipboard integration (OSC 52) > set -g set-clipboard on > ``` I will try that since I've been running into this issue at least since 1.1.42 and just didn't use tmux at all. It's weird though because copying from/to other applications inside tmux on WSL works fine.
Author
Owner

@MoshPitCodes commented on GitHub (Feb 3, 2026):

I found a way to solve this problem:
edit ~/.tmux.conf

set -g set-clipboard on
set -g allow-passthrough all

for me what worked was:

# Let applications inside tmux send OSC sequences (incl. OSC 52 clipboard) to the terminal
set -g allow-passthrough on

# Enable tmux clipboard integration (OSC 52)
set -g set-clipboard on

I will try that since I've been running into this issue at least since 1.1.42 and just didn't use tmux at all. It's weird though because copying from/to other applications inside tmux on WSL works fine.

Works! Cheers, kind stranger!

@MoshPitCodes commented on GitHub (Feb 3, 2026): > > > I found a way to solve this problem: > > > edit `~/.tmux.conf` > > > ``` > > > set -g set-clipboard on > > > set -g allow-passthrough all > > > ``` > > > > > > for me what worked was: > > ``` > > # Let applications inside tmux send OSC sequences (incl. OSC 52 clipboard) to the terminal > > set -g allow-passthrough on > > > > # Enable tmux clipboard integration (OSC 52) > > set -g set-clipboard on > > ``` > > I will try that since I've been running into this issue at least since 1.1.42 and just didn't use tmux at all. It's weird though because copying from/to other applications inside tmux on WSL works fine. Works! Cheers, kind stranger!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7257