VS Code Codex: Text prompts rejected after uploading SVG file

Open 💬 20 comments Opened Feb 3, 2026 by bymehul
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of the VS Code extension are you using?

1.107.1

What subscription do you have?

GO

Which IDE are you using?

VS Code

What platform is your computer?

Linux 6.14.0-29-generic x86_64 x86_64

What issue are you seeing?

Codex chat fails with “Invalid image in your last message” after an SVG file
is uploaded. Even after reloading VS Code, the error persists in the same chat;
only starting a completely new chat clears the issue. Text-only prompts work
normally until an SVG is uploaded.

What steps can reproduce the bug?

  1. Start a new Codex chat
  2. Send any text-only prompt (works)
  3. Upload or preview an SVG file
  4. Send another text-only prompt

What is the expected behavior?

Uploading an SVG file should not affect Codex chat.
After an SVG is uploaded, Codex should continue to accept text-only prompts
in the same chat without requiring a new chat.

Additional information

<img width="1085" height="169" alt="Image" src="https://github.com/user-attachments/assets/03fb14e8-17bb-4691-8eee-4e143b27d9d1" />
<img width="1071" height="107" alt="Image" src="https://github.com/user-attachments/assets/d838fd18-222c-4533-a249-e174700227f9" />

View original on GitHub ↗

20 Comments

kovarjan · 5 months ago

i had same issue after uploading svg

hamedmiir · 5 months ago

i had the same issue. when upload svg file in lates version of codex app on mac on, it says: Invalid image in your last message. Please remove it and try again. and kinda stuck. it repeats the error, even when i just send text prompt in the same chat.

zy0228 · 5 months ago

I'd like to keep going. What's the fix?

tatiang · 5 months ago

I'm having the same issue of a repeated error after attaching an HEIC file on a Mac. Nothing I do clears it (quitting Codex, logging out and back in, uploading a JPEG instead).

vonmanaois · 5 months ago

Anyone found a fix for this?

etraut-openai contributor · 5 months ago

The app should prevent you from attaching images if the file format is not supported by the model. We'll work on a fix for this. In the meantime, if you get into this state, create a new thread.

etraut-openai contributor · 5 months ago

This is addressed in the latest release.

suits-at · 5 months ago

Just had this exact same issue in the codex desktop app Version 26.212.1823 (661) so looks like its not yet addresse in all apps!? @etraut-openai

andymid3D · 5 months ago

please reopen, issue has appeared for me, first in original downloaded app 26.205.1301, then after updating to 26.212.1823 error continues. no workaround except opening new chat..?

Paco777 · 4 months ago

i also have the issue. the chat is now unusable.
(i had no issues with svg file for hours, until the very last one, that I might have added by drag and drop inadvertently)

KrisCris · 4 months ago

Same issue, and since we can't delete or edit the message, the entire chat is unusable

Version 26.226.940 (720)

Workaround: go to .codex/sessions, find your chat file, open it, and manually delete the lines of message that contain the SVG, so you can continue to chat with codex...

JAY-PANCHAL · 4 months ago

faced similar issue uploaded a screenshot from mac and its not going ahead because it requires me to go the old message and remove the image but there is no option to remove that kindly help deleting previous message or dont let user to enter any unsupported file

etraut-openai contributor · 4 months ago

How are you attaching the SVG to the thread? Are you using drag and drop, copy and paste, the "+" button, an at-mention? All of these should disallow the attachment of an SVG, since that format is not supported by the model.

csidirop · 4 months ago
Workaround: go to .codex/sessions, find your chat file, open it, and manually delete the lines of message that contain the SVG, so you can continue to chat with codex...

That worked for me (after reloading the extensions)

How are you attaching the SVG to the thread? Are you using drag and drop, copy and paste, the "+" button, an at-mention? All of these should disallow the attachment of an SVG, since that format is not supported by the model.

Was a drag & drop in my case.
Cant tell you the Codex version anymore because I saw an update and did it. But I'm on Linux if that matters.

najeeb-anwari · 3 months ago

I have also faced the same issue in the codex desktop app.

DanilAtyukov-dev · 3 months ago

Error Invalid image in your last message. Please remove it and try again.
appeared after use dta mcp https://github.com/yamsergey/dta

019d5dfb-ce68-74f3-bf97-b25e4b4ab578

DawidTracz · 2 months ago

Issue just appeared on my codex desktop as well as iphone

2spring · 2 months ago

issue happened to me codex windows desktop app ( nothing to do with vs code), after a svg artifact ,stuck at "Invalid image in your last message. Please remove it and try again" . There is no way to delete last prompts like i.e google ai studio . pls implement also message deletion it will improve user experience. We don't want to start 1000+ lines projects from scratch..

jezzawang · 1 month ago

still happening - can verify with Codex on MacOS

warm-july · 1 month ago

seeing the same issue on codex windows app even without uploading any images