Image in WSL do not work.

Resolved 💬 8 comments Opened Oct 3, 2025 by jamneutrino Closed Nov 14, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.44

Which model were you using?

5-Codex

What platform is your computer?

Windows via WSL

What steps can reproduce the bug?

Copy/Pasting an image or dragging image into the CLI

What is the expected behavior?

It should be an image readable by the Model

What do you see instead?

SImply a path to the image

Additional information

_No response_

View original on GitHub ↗

8 Comments

github-actions[bot] contributor · 9 months ago

Potential duplicates detected:

  • #4683
  • #3567
  • #3700
  • #3008
  • #2777

Powered by Codex Action

dedrisian-oai contributor · 9 months ago

This used to work?

Waxime64 contributor · 9 months ago

Same
OS: Windows 11
Codex-Cli version : 0.46 installed with npm install -g @openai/codex
Execute WSL
move to project directory
type codex for start codex-cli
paste image not working

esdrasrenan · 9 months ago

paste image not working also

yaliyy · 9 months ago

paste image not working also

Waxime64 contributor · 8 months ago

Summary (WSL): image paste/drag does not attach the actual image

  • In WSL terminals, pasting or drag-and-dropping an image does not transfer binary data to Codex TUI. Most terminals only insert a Windows path string like C:\Users\me\Desktop\shot.png (or nothing), so the TUI never receives an image payload.

Environment

  • Windows 11 + WSL2 (Ubuntu)
  • Terminal: Windows Terminal / conhost (same behavior with most terminals)
  • Codex CLI 0.48.0 (also reproducible in 0.47.x)

Expected

  • Paste or drag an image → Codex attaches the image to the message.

Actual

  • Paste → nothing or plaintext path.
  • Drag-and-drop → plaintext C:\... path inserted in the composer; no image attached.

Root cause (why this happens)

  • PTY/TTY is a text channel; there’s no standard VT/ANSI protocol for binary file upload.
  • The Windows↔WSL clipboard bridge is text-only for paste events.
  • Terminals commonly convert drag-and-drop into a path string, not a file upload.

---

Product enhancement proposal

If Codex detects that paste/drag produced a Windows path (not binary), it could:

  1. Offer to copy the file into a temp folder (e.g., ~/.codex/tmp/images/<sha>.png or project-local ./.codex/tmp/images/),
  2. Attach that temp file automatically,
  3. Prompt to auto-delete after send (rememberable preference).

This would make drag-and-drop usable in WSL without requiring users to switch to --image manually.

Waxime64 contributor · 8 months ago
etraut-openai contributor · 8 months ago

Closing in favor of #3939