GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unable to copy terminal output to clipboard on macOS · Issue #7134 · anomalyco/opencode

Unable to copy terminal output to clipboard on macOS #7134

New issue
Copy link
New issue
Copy link
Closed
Closed
Unable to copy terminal output to clipboard on macOS#7134
Copy link
Assignees
kommander
Labels
opentuiThis relates to changes in v1.0, now that opencode uses opentui

Description

@teddy-paris
teddy-paris
opened on Jan 6, 2026
Issue body actions

Problem

When using OpenCode's integrated terminal, users cannot copy text from the terminal output using Cmd+C on macOS. The keyboard shortcut appears to be intercepted by the TUI before it reaches the system clipboard.

Expected Behavior

Users should be able to select text in the integrated terminal and copy it to the clipboard using standard macOS shortcuts (Cmd+C), so they can paste it into the chat input or other applications.

Current Behavior

Pressing Cmd+C after selecting text in the integrated terminal does nothing - the text is not copied to the clipboard.

Environment

  • macOS
  • OpenCode TUI with integrated terminal

Suggested Solutions

  1. Pass through Cmd+C to the system when text is selected in the terminal
  2. Add a right-click context menu with "Copy" option
  3. Add a keybind specifically for terminal copy (e.g., Cmd+Shift+C)

Use Case

Users often need to copy error messages, file paths, or command output from the terminal to paste into the chat for context or to reference in their queries.

Reacted by b14d

Activity

  1. github-actions
    assigned
    kommander
    on Jan 6, 2026
  2. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 6, 2026
  3. github-actions commented on Jan 6, 2026

    @github-actions
    github-actionsBot
    on Jan 6, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • Unable to copy terminal output to clipboard on macOS #7132: Unable to copy terminal output to clipboard on macOS

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

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  4. kommander commented on Jan 6, 2026

    @kommander
    kommander
    on Jan 6, 2026 – with Linear
    Contributor
    More actions

    What integrated terminal? Are you using a fork? Opencode does not yet have an integrated terminal officially. From the TUI itself select should automatically copy the selected text on mouse button release currently. There are too many conflicting keybindings that would make it impossible to use the OS defaults, also their capture is not supported by all terminals.

  5. ErvisTusha commented on Jan 7, 2026

    @ErvisTusha
    ErvisTusha
    on Jan 7, 2026
    More actions

    I can confirm this issue also occurs on Ubuntu with the default terminal. Running OpenCode v1.1.4, I am able to select text and receive a copy confirmation notification, however the text is not actually copied to the clipboard.

  6. ErvisTusha commented on Jan 7, 2026

    @ErvisTusha
    ErvisTusha
    on Jan 7, 2026
    More actions

    I've created a pull request (#7220) to fix the clipboard error handling issue. This PR enhances the clipboard functionality across all platforms with improved error propagation and exit code checking.

    The changes include:

    • Better error handling for Linux clipboard tools (wl-copy, xclip, xsel)
      • Proper detection and handling of Wayland vs X11 environments
        • Clear error messages when tools are missing
          • User-friendly error notifications when clipboard operations fail
            Please feel free to review the PR at: fix: Enhance clipboard error handling by propagating errors and checking command exit codes #7220
  7. ErvisTusha commented on Jan 7, 2026

    @ErvisTusha
    ErvisTusha
    on Jan 7, 2026
    More actions

    fixed for 1.1.6

  8. skhaz commented on Jan 8, 2026

    @skhaz
    skhaz
    on Jan 8, 2026
    More actions

    I have the same issue on iterm2.

    It do not allow me to use cmd+c to copy, instead, it copies when I select any text /facepalm.

    Reacted by Saeyeol Lee and Lars Moan
  9. gardner commented on Feb 6, 2026

    @gardner
    gardner
    on Feb 6, 2026
    More actions

    The copy / paste hijacking really makes it hard to use opencode.

    Reacted by Rodrigo Delduca, Lars Moan, steven-twelve, noam stein, cong-003, Roni HaCohen, Brian D, Matias Benitez, Pietro Spadaccino, Chris Putnam and 4 more
  10. github-actions commented on Apr 8, 2026

    @github-actions
    github-actionsBot
    on Apr 8, 2026 – with GitHub Actions
    Contributor
    More actions

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

  11. github-actions
    closed this as completedon Apr 8, 2026
  12. WolfgangFahl commented on Apr 12, 2026

    @WolfgangFahl
    WolfgangFahl
    on Apr 12, 2026
    More actions

    #12800 still open why is this closed?

  13. kommander commented on Apr 12, 2026

    @kommander
    kommander
    on Apr 12, 2026 – with Linear
    Contributor
    More actions

    cmd+c cannot be captured reliably in terminals, because the terminal app captures it and does not pass it through to applications. That is a terminal limitation.

    Reacted by Pietro Spadaccino
  14. danieltvela commented on Jun 10, 2026

    @danieltvela
    danieltvela
    on Jun 10, 2026
    More actions

    I found a workaround for Terminal.app in macOS.

    Just press Cmd+R to disable "Allow Mouse Reporting", or deselect this option in the View menu of Terminal.app.

    This is very useful if you are using ssh to connect to a remote host to run OpenCode.

    Reacted by Sup3rS0nicX, blanser-cc, Beau, Enrico Morselli, Patrick Kelleher, moreindirection, Luca Gibelli, CuiOrange, Matt Shirley and Stephen Yu
  15. moreindirection commented on Jul 28, 2026

    @moreindirection
    moreindirection
    on Jul 28, 2026
    More actions

    I found a workaround for Terminal.app in macOS.

    Just press Cmd+R to disable "Allow Mouse Reporting", or deselect this option in the View menu of Terminal.app.

    This is very useful if you are using ssh to connect to a remote host to run OpenCode.

    This works!

    Reacted by Luca Gibelli and Stephen Yu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kommander
    kommander

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.