Skip to content

Clipboard copy path hard-codes tmux passthrough #25252

Closed as not planned
Closed as not planned

Description

@rich-jojo

Summary

packages/opencode/src/cli/cmd/tui/util/clipboard.ts switches OSC 52 into the tmux DCS passthrough envelope whenever TMUX or STY is present.

That breaks clipboard copy in a common tmux setup:

  • set -g set-clipboard on
  • set -g allow-passthrough off

In that topology tmux can still handle raw OSC 52 for clipboard forwarding, but the DCS passthrough envelope is exactly what allow-passthrough off blocks.

Reproduction

  1. Start tmux with set -g set-clipboard on and set -g allow-passthrough off
  2. Run opencode inside tmux over SSH
  3. Use any OpenCode-native copy path that goes through Clipboard.copy() (for example a sidebar/message copy action)
  4. The terminal clipboard does not update

Current behavior

The helper currently does this when TMUX/STY is set:

const sequence = passthrough ? "\x1bPtmux;\x1b${osc52}\x1b\\" : osc52

Expected behavior

Please support an explicit OSC 52 mode, for example:

  • raw
  • tmux-passthrough
  • off

That would let tmux users keep allow-passthrough off while still using tmux's own set-clipboard on path for raw OSC 52.

Traceability

  • Tools used: OpenCode

Activity

  1. github-actions commented on May 1, 2026

    @github-actions
    Contributor

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

    Please review these existing issues and consider closing this one in favor of the existing reports, or clarifying how this differs.

  2. github-actions commented on Jul 1, 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