Error using /copy

Open 💬 19 comments Opened Feb 25, 2026 by cvjxendra
💡 Likely answer: A maintainer (won-openai, contributor) responded on this thread — see the highlighted reply below.

Using /copy for the first time. Gives me this error:

■ Failed to copy to clipboard: clipboard unavailable: Unknown error while interacting with the clipboard: X11 server
connection timed out because it was unreachable

https://github.com/openai/codex/issues/new?template=2-bug-report.yml&steps=Uploaded%20thread:%20019c9712-c6de-7cf0-9167-8ca95680ff26

View original on GitHub ↗

19 Comments

won-openai contributor · 4 months ago

may i ask for more information on the context?

won-openai contributor · 4 months ago

are you on ssh by any chance?

cvjxendra · 4 months ago

I'm using WSL2 on Windows 10.

Junior

Em qua., 25 de fev. de 2026, 21:20, Won Park @.***>
escreveu:

won-openai left a comment (openai/codex#12836) <https://github.com/openai/codex/issues/12836#issuecomment-3963066708> are you on ssh by any chance? — Reply to this email directly, view it on GitHub <https://github.com/openai/codex/issues/12836#issuecomment-3963066708>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXGBWKWUSXIOZPRGP5N264D4NY34BAVCNFSM6AAAAACV74EEK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSNRTGA3DMNZQHA> . You are receiving this because you authored the thread.Message ID: @.***>
won-openai contributor · 4 months ago

ok, will update

niebayes · 4 months ago

Same issue.

Failed to copy to clipboard: clipboard unavailable: Unknown error while interacting with the clipboard: X11 server connection timed out because it was unreachable

Codex version: v0.105.0
OS: Ubuntu 24.04.2 LTS

nvictor · 4 months ago

The /copy command did not work at all for me in version codex-cli 0.44.0.

etraut-openai contributor · 4 months ago

@nvictor, can you confirm the version you're using? 0.44.0 is half a year old. The latest version is 0.106.0.

thomas-gandy · 4 months ago

I get this error too. Specifically, when using codex 0.106.0 in VS Code on Ubuntu 25.10 when inside a dev container. I appreciate that 25.10 drops X11 support in favour of Wayland.

won-openai contributor · 4 months ago

hi all! /copy currently assumes native clipboard access. that breaks in environments like WSL2, SSH, and VS Code dev containers where the Linux process cannot directly reach the user’s local clipboard. Currently working on a follow-up and should be out next release!

nvictor · 4 months ago

I really did have an old version. I can use the /copy command now.

Elite-zx · 4 months ago
hi all! /copy currently assumes native clipboard access. that breaks in environments like WSL2, SSH, and VS Code dev containers where the Linux process cannot directly reach the user’s local clipboard. Currently working on a follow-up and should be out next release!大家好!/copy 命令目前依赖于原生剪贴板访问权限。这在 WSL2、SSH 和 VS Code 开发容器等环境中会失效,因为在这些环境中,Linux 进程无法直接访问用户的本地剪贴板。我们正在开发后续版本,预计会在下一个版本中发布!

Still not available.
I am using Mac iTerm2 to remotely log in to a Linux server via SSH.

version:

❯ codex --version
codex-cli 0.111.0

in codex session:

$ /copy
■ Failed to copy to clipboard: clipboard unavailable: Unknown error while interacting with the clipboard: X11 server connection timed out because it was unreachable
hamayreh · 4 months ago

@Elite-zx Where you able to solve this? I have the same case (codex in a remote Linux VM that I access over SSH using iTerm2).

Elite-zx · 4 months ago
@Elite-zx Where you able to solve this? I have the same case (codex in a remote Linux VM that I access over SSH using iTerm2).这个问题解决了吗?我的情况也一样(codex 位于远程 Linux 虚拟机中,我通过 SSH 使用 iTerm2 访问它)。

Not yet, I'm waiting for the developer's reply.

won-openai contributor · 4 months ago

@Elite-zx @hamayreh We don't support SSH/WSL /copy yet! Sorry for the inconveniences. We hear you and the follow-up will come soon when there is enough bandwidth. Thank you for your understanding 🙏

won-openai contributor · 4 months ago

hi all. just merged a fix. please let me know if something isn't working. feel free to message me or @ me on X @wonforall if you need immediate attention.

won-openai contributor · 4 months ago

Double checking before I close this issue. Is everything working fine for everyone?

abs · 3 months ago

@won-openai started getting this in Foot terminal recently (tmux, not ssh) on NixOS

used to work great

won-openai contributor · 3 months ago

@abs used to work great on tmux? on NixOS?

abs · 3 months ago

Yes - pasting images used to work great in tmux on NixOS :)

Sent via Superhuman ( @.*** )

On Thu, Apr 2, 2026 at 22:29, Won Park < @.*** > wrote:

won-openai left a comment (openai/codex#12836) ( https://github.com/openai/codex/issues/12836#issuecomment-4181961969 ) @abs ( https://github.com/abs ) used to work great on tmux? on NixOS? — Reply to this email directly, view it on GitHub ( https://github.com/openai/codex/issues/12836?email_source=notifications&email_token=AAAKBTUUHMAYB3CMKKHPTTT4T5D45A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJYGE4TMMJZGY42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4181961969 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAAKBTVJDTYBYFRI7HZO3CL4T5D45AVCNFSM6AAAAACV74EEK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOBRHE3DCOJWHE ). You are receiving this because you were mentioned. Message ID: <openai/codex/issues/12836/4181961969 @ github. com>