Summary
Pasting clipboard images via Ctrl+V or Cmd+V does not work on macOS. This feature works on Windows out of the box.
Root Cause
The Copilot CLI detects image paste via an empty bracketed paste sequence (\x1B[200~\x1B[201~). On Windows, Windows Terminal emits this sequence when Ctrl+V is pressed with an image-only clipboard — triggering onEmptyPasteFallback() → ClipboardManager().getImageData().
On macOS, terminal emulators (Terminal.app, iTerm2) intercept Cmd+V at the OS level:
| Clipboard content |
What the terminal sends to the process |
| Text |
Bracketed paste with the text |
| Image only |
Nothing at all ← the problem |
Ctrl+V (without Cmd) reaches the process as raw byte \x16 (ASCII 22), which is treated as a literal character — not a paste trigger.
Expected Behavior
Ctrl+V (or some keyboard shortcut) in the Copilot CLI on macOS should attach a clipboard image when one is present, matching the Windows experience.
Suggested Fix
In the key handler, detect \x16 (Ctrl+V) and check ClipboardManager().getAvailableFormats() or getImageData(). If an image is found and no text is present, proceed with the image attachment flow directly — without needing the bracketed paste sequence as intermediary.
Workaround
A community monkey-patch is available that intercepts \x16 in process.stdin.read() and injects the bracketed paste sequence when an image is on the clipboard:
👉 https://github.com/idanshimon/copilot-cli-image-paste
curl -fsSL https://raw.githubusercontent.com/idanshimon/copilot-cli-image-paste/main/patch.sh | bash
Environment
- macOS (Apple Silicon + Intel, both affected)
- Terminal.app and iTerm2 (both affected — OS-level limitation)
- Copilot CLI
1.0.40-0 (also observed on earlier versions)
Summary
Pasting clipboard images via
Ctrl+VorCmd+Vdoes not work on macOS. This feature works on Windows out of the box.Root Cause
The Copilot CLI detects image paste via an empty bracketed paste sequence (
\x1B[200~\x1B[201~). On Windows, Windows Terminal emits this sequence whenCtrl+Vis pressed with an image-only clipboard — triggeringonEmptyPasteFallback()→ClipboardManager().getImageData().On macOS, terminal emulators (Terminal.app, iTerm2) intercept
Cmd+Vat the OS level:Ctrl+V(without Cmd) reaches the process as raw byte\x16(ASCII 22), which is treated as a literal character — not a paste trigger.Expected Behavior
Ctrl+V(or some keyboard shortcut) in the Copilot CLI on macOS should attach a clipboard image when one is present, matching the Windows experience.Suggested Fix
In the key handler, detect
\x16(Ctrl+V) and checkClipboardManager().getAvailableFormats()orgetImageData(). If an image is found and no text is present, proceed with the image attachment flow directly — without needing the bracketed paste sequence as intermediary.Workaround
A community monkey-patch is available that intercepts
\x16inprocess.stdin.read()and injects the bracketed paste sequence when an image is on the clipboard:👉 https://github.com/idanshimon/copilot-cli-image-paste
curl -fsSL https://raw.githubusercontent.com/idanshimon/copilot-cli-image-paste/main/patch.sh | bashEnvironment
1.0.40-0(also observed on earlier versions)