bug: codex reads an image, crashes and session cannot be recovered

Resolved 💬 4 comments Opened Oct 19, 2025 by Maolon Closed Dec 23, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.47.0

What subscription do you have?

Pro

Which model were you using?

gpt-5-high

What platform is your computer?

Darwin 25.1.0 arm64 arm

What issue are you seeing?

Codex suddenly started to view the image and crashed the session, even I did not say anything about or related to the image.

• Ran python - << 'PY'
  │ import pathlib
  │ p = pathlib.Path('app')

• Explored
  └ Search \[id\]\.tsx in app

• Viewed Image
  └ app/(modals)/intro/[id].tsx

■ unexpected status 400 Bad Request: {
  "error": {
    "message": "Invalid 'input[37].content[0].image_url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got unsupported MIME type 'image'.",
    "type": "invalid_request_error",
  }
}

And this issue cannot be recover even I try to skip this step

› skip this step


■ unexpected status 400 Bad Request: {
  "error": {
    "message": "Invalid 'input[37].content[0].image_url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got unsupported MIME type 'image'.",
    "type": "invalid_request_error",
    "param": "input[37].content[0].image_url",
    "code": "invalid_value"
  }
}

What steps can reproduce the bug?

N/A

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4132
  • #3875
  • #4946

Powered by Codex Action

TimAnthonyAlexander · 10 months ago

Had this error in the Codex Extension for VSCode.

wzhliang · 9 months ago

I am seeing same error with gpt-5.1-codex high. v0.60.1

shankarkuru · 3 months ago

open a new chat and get the session ID and deeplink from the other chat and ask to fix the image.