Endless loop: The image date you provided does not represent a valid image
What version of Codex is running?
0.27.0
Which model were you using?
gpt-5
What platform is your computer?
darwin 24.6.0 arm64 arm
What steps can reproduce the bug?
I am working with a bit of csv data, python to analyse and a react visualisation of this data, at some point codex says:
I’ll render an SVG preview so you can see it here, and share how to open the HTML locally.
_
✓ ⌨️ python3 trend_viz/scripts/render_svg.py
then it goes into an endless loop of
⚠ stream error: unexpected status 400 Bad Request: {
"error": {
"message": "The image data you provided does not represent a valid image. Please check your input and try again with one of the supported image formats: ['image/jpeg', 'image/png', 'image/gif',
'image/webp'].",
"type": "invalid_request_error",
"param": "input",
"code": "invalid_value"
}
}; retrying 1/5 in 204ms…
it does not matter what I say after that, it always repeats with the same error, even if no image is involved in the following message
<img width="1422" height="824" alt="Image" src="https://github.com/user-attachments/assets/e042c7be-e95e-4248-922d-9dc20165a8d6" />
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
8 Comments
Same problem here. I also uploaded SVG and broke it... And now it just runs into endless loop.... I can't stop it no matter what I try...
Same problem. No matter what prompt keeps throwing error
same problem :
stream error: unexpected status 400 Bad Request: {"error": {
"message": "The image data you provided does not represent a valid image. Please check your input and try again with one of the supported image formats: ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].",
"type": "invalid_request_error",
"param": "input",
"code": "invalid_value"
}
}; retrying 3/5 in 750ms…
Dont see this issue, when working the codebase with claude code.
Same problem here. An endless loop of errors
Same here!
Thanks for reporting the problem. This appears to be the same issue as https://github.com/openai/codex/issues/3050. I'm going to close this one to reduce duplication.
unexpected status 400 Bad Request: {
"error": {
"message": "The image data you provided does not represent a valid image..."
"param": "input",
"code": "invalid_value"
}
}
Exactly the same problem i have with codex