Skip to content

Image in WSL do not work. #4683

Closed as duplicate
Closed as duplicate

Description

@jamneutrino

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

Activity

  1. added
    bug
    on Oct 3, 2025
  2. added
    windows-os
    on Oct 3, 2025
  3. dedrisian-oai commented on Oct 3, 2025

    @dedrisian-oai
    Contributor

    This used to work?

  4. Waxime64 commented on Oct 17, 2025

    @Waxime64
    Contributor

    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

  5. esdrasrenan commented on Oct 22, 2025

    @esdrasrenan

    paste image not working also

  6. yaliyy commented on Oct 23, 2025

    @yaliyy

    paste image not working also

  7. Waxime64 commented on Oct 24, 2025

    @Waxime64
    Contributor

    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.

  8. Waxime64 commented on Oct 30, 2025

    @Waxime64
    Contributor

    Pull request: #5644

  9. etraut-openai commented on Nov 14, 2025

    @etraut-openai
    Contributor

    Closing in favor of #3939

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

    bugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions