Skip to content

Add macOS-friendly clipboard fallback #12800

Closed as not planned
Closed as not planned

Description

@AndersHsueh

Description

The CLI clipboard helper only runs xclip via Bun, which doesn't exist on macOS without X11.

问题

Bun.which('xclip') merely detects the binary but macOS ships no compatible xclip, so clipboard support never activates.

Suggestion

Add a macOS-friendly fallback (e.g. pbcopy/pbpaste or a cross-platform helper) when xclip is unavailable.

建议

当 xclip 缺失时,改为调用 pbcopy/pbpaste 或其他跨平台剪贴板工具,确保 macOS 下也能使用剪贴板。

Activity

  1. github-actions commented on Feb 9, 2026

    @github-actions
    Contributor

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

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

  2. WolfgangFahl commented on Mar 1, 2026

    @WolfgangFahl

    currently 2026-03-01 the clipboard handling on MacOS seems to even breaksdefault MacOS clipboard behavior. A true nightmare!

  3. bcdurden commented on Apr 12, 2026

    @bcdurden

    confirmed still broken on MacOS.

  4. nitishdhar commented on Apr 17, 2026

    @nitishdhar

    Confirmed still broken on MacOS

  5. fatso1000 commented on Apr 23, 2026

    @fatso1000

    Not working on MacOS

  6. LPFchan commented on May 24, 2026

    @LPFchan

    Solution found: install xclip

    sudo apt install xclip My environment:

    * Ubuntu 26.04 + Ptyxis + Wayland
    
    * OpenCode 1.15.5
    
    * No multiplexers (tmux/zellij)
    

    Why it works: OpenCode seems to use xclip as a fallback for copying to the clipboard when OSC52 fails (which happens in certain Linux terminals with Wayland). Before this, auto-copy-on-select showed "Copied to clipboard" but never reached the clipboard. After installing xclip, it works perfectly. Note: the solution is simple and doesn't require changing terminals or disabling Wayland. Hope this helps other users with the same issue.

    sorry this is a macos-specific thread

  7. c3qo commented on Jun 1, 2026

    @c3qo

    I use tmux+nvim+opencode (invoked by sidekick.nvim) on macos, no xclip installed
    add this in tmux.conf

    set -g allow-passthrough on
    

    run tmux kill-server
    then restart tmux+opencode. it would work. I use kitty+ssh to connect the macos remotely.

    I also tested kitty+opencode without tmux, it works too.

  8. github-actions commented on Aug 3, 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