Skip to content

Support pasting images from iOS → macOS (Universal Clipboard) into Codex CLI composer #4366

Closed as duplicate

Description

@ayaryabi

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
1. On iPhone: take a screenshot → Share → Copy.
2. On Mac: focus the Codex CLI composer (codex with no args).
3. Press ⌘V (or Ctrl+V, depending on key handling).
4. 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

Activity

  1. added
    enhancement
    on Sep 27, 2025
  2. etraut-openai commented on Nov 28, 2025

    @etraut-openai
    Contributor

    We are tracking this in #3939, so I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions