After sending an image in a Codex CLI conversation, all subsequent requests fail with a JSON deserialization error, leaving the conversation completely stuck.
Open 💬 3 comments Opened Jul 25, 2026 by GreatYao-Git
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
复现步骤
- 在对话中发送一张图片
- 继续发送文字消息
- 每次请求返回错误:Failed to deserialize the JSON body into the target type:
messages[49]: unknown variant image_url, expected text
at line 1 column 262721
- 只能放弃当前对话,新建对话
期望
- 支持 image_url 消息类型,或
- 提供恢复机制(跳过/清理坏消息)
环境
- Codex CLI 桌面版 (Windows)
- 消息类型
image_url被反序列化器拒绝
3 Comments
English translation:
Steps to reproduce
messages[49]: unknown variant image_url, expected text
at line 1 column 262721
Expected behavior
Environment
image_urlmessage type is rejected by the deserializer<!-- codex-issue-translator -->
Confirmed on macOS as well.
Environment
Same error: messages[1]: content should be a string or a list
(column 77051 for user turn, column 21736 for thread title generation)
This confirms the bug is cross-platform (Windows + macOS).
Confirmed on macOS as well.
Environment
Same error: messages[1]: content should be a string or a list
(column 77051 for user turn, column 21736 for thread title generation)
This confirms the bug is cross-platform (Windows + macOS).