Skip to content

Clipboard copy not working over SSH (Mac-to-Mac) #16962

@innerr

Description

@innerr

OpenCode shows "copied to clipboard" notification when selecting text with mouse, but the system clipboard is not updated. This happens when running OpenCode over SSH from one Mac to another Mac.

Environment:

  • Local machine: macOS (SSH client)
  • Remote machine: macOS (SSH host, where opencode runs)
  • OpenCode version: 1.2.24
  • Remote macOS version: macOS 26.3.1 (upgraded from macOS 15.4 today - issue exists on both versions)

Steps to Reproduce:

  1. SSH from local Mac to remote Mac
  2. Run opencode on the remote Mac
  3. Use mouse to select text in the opencode TUI
  4. Observe the "copied to clipboard" notification appears
  5. Press Cmd+V on the local Mac to paste

Expected Behavior:

The selected text should be in the system clipboard and paste correctly.

Actual Behavior:

The clipboard still contains previous content. The "copied to clipboard" notification is shown, but no actual data is written to the clipboard.

Additional Context:

  • Running pbpaste on the remote Mac shows old clipboard content, confirming the clipboard was never updated
  • This is similar to issue Clipboard copy not working over SSH + tmux in Ghostty #15907, but that issue describes SSH to Linux. This issue specifically confirms the bug also occurs in Mac-to-Mac SSH scenarios
  • The bug existed on macOS 15.4 and persists after upgrading to macOS 26.3.1, so it is not a regression introduced by the latest macOS version

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

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