Skip to content

Clipboard copy not working over SSH + tmux in Ghostty #15907

@Ayoola

Description

@Ayoola

Description

OpenCode's copy function shows "copied to clipboard" notification but doesn't actually update the system clipboard when running over SSH inside tmux.

Description

OpenCode's copy function shows "copied to clipboard" notification but doesn't actually update the system clipboard when running over SSH inside tmux.

Environment

  • Terminal: Ghostty on macOS
  • Remote: SSH into Linux workstation
  • Multiplexer: tmux with set -g set-clipboard on
  • OpenCode pane: right side of a tmux split

Steps to Reproduce

  1. SSH into a remote machine from Ghostty
  2. Start tmux with a horizontal split – shell on the left, OpenCode on the right
  3. Highlight/copy text from the OpenCode pane
  4. Attempt to paste with Cmd+V

Expected

Copied text appears in the macOS clipboard.

Actual

OpenCode shows "copied to clipboard" notification, but Cmd+V pastes the previous clipboard content. The clipboard is not updated.

Notes

  • Copying from the shell pane in the same tmux session works correctly – clipboard is updated and Cmd+V pastes the new content.
  • This suggests tmux and Ghostty OSC 52 passthrough are configured correctly, and the issue is specific to how OpenCode emits the OSC 52 sequence.

Plugins

N/A

OpenCode version

1.2.15

Steps to reproduce

  1. SSH into a remote machine from Ghostty
  2. Start tmux with a horizontal split – shell on the left, OpenCode on the right
  3. Highlight/copy text from the OpenCode pane
  4. Attempt to paste with Cmd+V

Screenshot and/or share link

No response

Operating System

MacOS 26.3

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions