Skip to content

[macOS] Cmd+C copy broken after alt-screen enabled by default for --experimental users (v0.0.413) #1585

@kevindesuyo

Description

@kevindesuyo

Describe the bug

Since v0.0.413, alt-screen mode is enabled by default for users running with the --experimental flag. This causes Cmd+C text copy to stop working on macOS because the TUI's mouse reporting captures mouse drag events, preventing the terminal emulator from performing native text selection.

Before v0.0.413, alt-screen was opt-in, and Cmd+C worked normally for copying text. After the update, there is nothing to copy because text selection is intercepted by the TUI.

The relevant changelog entry from v0.0.413:

Enable alt-screen mode by default when running with --experimental flag

v0.0.414 added Ctrl+Insert for copying selected text in alt-screen, but this is not a standard macOS shortcut — most Mac keyboards do not have an Insert key.

Steps to reproduce the behavior

  1. Run copilot with --experimental flag enabled (or with experimental features turned on in config)
  2. Have Copilot generate some output
  3. Try to select text with the mouse and press Cmd+C to copy
  4. Text selection is captured by the TUI mouse reporting — nothing gets copied to clipboard

Expected behavior

Cmd+C should copy selected text to the system clipboard, consistent with macOS conventions. Possible solutions:

  • Support Cmd+C as a native copy shortcut within the alt-screen TUI (macOS)
  • Use OSC 52 escape sequences to programmatically write selections to the system clipboard
  • Add a config option to disable mouse reporting so native terminal selection works
  • Reconsider making alt-screen the default for --experimental users, or at least document the copy behavior change

Workaround

  • Hold Shift (or Option in iTerm2) while dragging to bypass mouse reporting, then Cmd+C works
  • Run copilot --no-alt-screen to disable alt-screen mode
  • Use Ctrl+Insert to copy (v0.0.414+, but impractical on Mac keyboards)

Affected version

v0.0.413 ~ v0.0.414 (current)

Additional context

  • OS: macOS (Apple Silicon)
  • Copilot CLI version: 0.0.414
  • Config: experimental features enabled, staff mode enabled
  • The issue affects all macOS terminal emulators (Terminal.app, iTerm2, Ghostty, Kitty, etc.) since mouse reporting is handled at the TUI level before the terminal can process selections

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions