Skip to content

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

Closed as not planned
Closed as not planned

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 11, 2026
  2. github-actions commented on Mar 11, 2026

    @github-actions
    Contributor

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

    If your Mac-to-Mac scenario has a distinct cause or requires a separate fix, please clarify how it differs from #15907.

  3. uriva commented on Apr 9, 2026

    @uriva

    Same issue here, running opencode over SSH. The "copied to clipboard" message shows up but nothing actually lands in the clipboard. Would be great to get this fixed since SSH is a pretty common workflow.

  4. hqhq1025 commented on Apr 12, 2026

    @hqhq1025

    If you're on macOS, clipaste may help — it's a background daemon that normalizes the screenshot clipboard so image paste works in terminal AI tools. Also supports SSH remote paste.

    brew install hqhq1025/clipaste/clipaste
    brew services start clipaste

    For SSH remote: clipaste ssh-setup user@host

    GitHub: https://github.com/hqhq1025/clipaste

  5. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  6. LPFchan commented on May 24, 2026

    @LPFchan

    can confirm this is still indeed an issue, macos 15.7.4

  7. mack-peng commented on May 28, 2026

    @mack-peng

    I encountered the same issue. I encountered this problem when connecting to a mac mini on Warp. I tested on iTerm2 and was able to successfully transfer the selected content back to the local clipboard

  8. github-actions commented on Jul 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions