Support pasting images from iOS → macOS (Universal Clipboard) into Codex CLI composer
What feature would you like to see?
Summary
Pasting screenshots/images copied on my iPhone (Share → Copy) into the Codex CLI interactive composer doesn’t work. The same workflow works in other tools (e.g., Claude Code, Slack, Notes). Request: let Codex accept Universal Clipboard image pastes (PNG/JPEG/HEIC), auto-convert if needed, and attach them to the current message.
Why this matters
For quick bug reports / UI reviews I often copy a screenshot on iPhone and paste straight into my Mac. Having to save/airdrop/upload adds friction. Direct paste would make Codex a drop-in replacement for my other dev tools.
Steps to reproduce
- On iPhone: take a screenshot → Share → Copy.
- On Mac: focus the Codex CLI composer (codex with no args).
- Press ⌘V (or Ctrl+V, depending on key handling).
- Nothing attaches.
Expected
• Codex detects an image on the system clipboard (from Universal Clipboard).
• Shows the thumbnail preview like when pasting a local clipboard screenshot.
• Attaches it to the current prompt.
Actual
• Paste is ignored (no attachment, no error).
Environment
• macOS: [your version]
• Terminal: [iTerm/Apple Terminal/Alacritty + version]
• Codex CLI: [version]
• iOS: [version], device: [model]
Current workaround
• Use pngpaste /tmp/shot.png && codex -i /tmp/shot.png ... (or drag-and-drop). Works but breaks the fast “copy on phone → paste on Mac” loop.
Proposed implementation notes
• On macOS, check NSPasteboard.general for these types:
• public.png, public.jpeg, public.tiff, public.heic, and file promises (NSPasteboardTypeFileURL, public.file-url).
• Universal Clipboard can provide a promised item (lazy transfer). Request data for any supported image UTI and, if HEIC, transcode to PNG (ImageIO) into a temp file before attaching.
• Hard-limit image size (e.g., 10–20 MB) and strip EXIF for privacy.
• Show a small toast/error if paste contains an unsupported type.
Acceptance criteria
• Pasting an iPhone screenshot (Share → Copy) into Codex CLI on macOS attaches the image.
• Works for PNG/JPEG/HEIC; HEIC auto-converts to PNG.
• No regression for existing local clipboard screenshot pastes.
• Clear error when paste exceeds size limits.
Are you interested in implementing this feature?
_No response_
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗