Codex TUI should support image paste via Cmd-V / terminal paste, not only Ctrl-V
Open 💬 5 comments Opened May 24, 2026 by acetonitrile
What variant of Codex are you using?
CLI
What feature would you like to see?
Useful body:
## Environment
- Codex: codex-cli 0.133.0
- OS: macOS
- Terminal: iTerm2
- Clipboard contents: screenshot/image
## Current behavior
In Codex TUI, image paste works with Ctrl-V, but Cmd-V does not paste/attach the image. This is confusing on macOS because
Cmd-V is the normal paste gesture and works for text paste.
## Expected behavior
Codex should make image paste discoverable and ergonomic on macOS, ideally by handling Cmd-V/terminal paste where possible, or
showing a hint when the clipboard contains an image and Cmd-V cannot attach it.
## Why this matters
Claude Code appears to handle this path more ergonomically, while Codex requires knowing that Ctrl-V is the image paste
shortcut.
I’d tag it as an enhancement / CLI / TUI / macOS issue if the chooser lets you.
Additional information
_No response_
5 Comments
Current clipboard-image paste is handled by an explicit
vshortcut path with Ctrl/Alt modifiers: the TUI advertisesCtrl+Vand, under WSL,Ctrl+Alt+V; that path callspaste_image_to_temp_png()and attaches the PNG. Terminal paste events currently arrive ascrossterm::Event::Paste(String)/TuiEvent::Paste(String), so the normal paste path only receives text before passing it toChatComposer::handle_paste. On macOS/iTerm2,Cmd+Vbehaves like the terminal paste action for text, so clipboard images do not hit the image-read path today. Supporting this likely needs either aSuper/Metakey path or an explicit clipboard-image check from the paste path. The keymap config also only acceptsctrl/alt/shiftmodifiers today, socmd-v/meta-vis not configurable.🔧 Proposed Solution
Root Cause
The TUI's image paste handler is bound to
Ctrl-Vonly, while text paste uses the terminal's native paste mechanism (which responds to Cmd-V). On macOS, Cmd-V is the standard paste gesture, making Ctrl-V for images confusing and undiscoverable.The issue is that terminal applications on macOS cannot directly intercept Cmd-V because the terminal emulator consumes them first.
Fix
Files to Modify
src/tui/input-handler.ts— Add Cmd-V + bracketed paste handlingsrc/tui/terminal-setup.ts— Enable bracketed paste modesrc/tui/prompt-hints.ts— Add visual hints for image pastesrc/tui/help-overlay.ts— Update help textComplexity: Medium (3-5 hours, macOS-specific)
Full solution document:
codex-24322-tui-image-paste-cmdv-fix.mdAdding another macOS data point for the screenshot-to-clipboard workflow.
Environment:
codex-cli 0.133.0TERM_PROGRAM=vscode,TERM=xterm-256color)Workflow that currently feels broken:
Control + Shift + Command + 4.Command + V, expecting the screenshot image to be attached.Observed:
pngpasteand then attaching a file path work, but they are much slower for screenshot-heavy UI debugging.Expected:
Command + Vfrom carrying image data, the TUI should expose a clear in-session shortcut or command such as "attach clipboard image" that saves the pasteboard image to a temp file and attaches it automatically.This is especially noticeable because Claude Code handles this workflow more ergonomically, while Codex already supports adjacent flows like drag-and-drop and
-i/--imagefile attachment.Still reproducible with
codex-cli 0.147.0on macOS 26.5.2 in tmux 3.7c.Cmd+Vdoes not attach a screenshot copied to the clipboard in an active TUI session.-i/--imageonly helps when starting a session, so it does not replace the screenshot-heavy in-session workflow. Claude Code supports this workflow directly.Please support native
Cmd+Vwhere the terminal allows it, or provide a discoverable in-session "attach clipboard image" command and hint.Update: confirmed working with
codex-cli 0.148.0on macOS 26.5.2 in tmux 3.7c. Clipboard images attach successfully in an active TUI session usingCtrl+V. The remaining request is discoverability and nativeCmd+Vsupport on macOS.