VS Code Codex: Text prompts rejected after uploading SVG file
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?
- Start a new Codex chat
- Send any text-only prompt (works)
- Upload or preview an SVG file
- 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" />
20 Comments
i had same issue after uploading svg
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.
I'd like to keep going. What's the fix?
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).
Anyone found a fix for this?
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.
This is addressed in the latest release.
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
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..?
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)
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...
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
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.
That worked for me (after reloading the extensions)
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.
I have also faced the same issue in the codex desktop app.
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
Issue just appeared on my codex desktop as well as iphone
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..
still happening - can verify with Codex on MacOS
seeing the same issue on codex windows app even without uploading any images