Bug: Multimodal message serialization error causes images to not display

Open
#35,544 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js, rust
Domain
api, desktop

Research direction

Start at the reported src-BPbHdvxe.js stack path and trace routeIncomingMessage through dispatchParsedMessage and drainLineQueue while reproducing with an image. Verify that multimodal messages are serialized as an accepted string or content-part list, then confirm images render and both conversation turns and thread-title generation succeed without deserialization errors.

Written by the indexing model from the issue text.

Description

app app-server bug imagen

Bug: Multimodal message serialization error causes images to not display

Summary

When images are included in a conversation, the app fails to render them and repeatedly triggers API serialization errors: messages[1]: content should be a string or a list.

Environment
  • App: ChatGPT Desktop (Codex) v26.721.41059
  • OS: macOS 26.5.2 (Build 25F84)
  • Node: v24.14.0
Error Logs

Instance 1 (thread title generation):
2026-07-27T03:54:13.783Z [ThreadMetadataGenerationService] Failed to generate thread title
errorMessage="Structured turn failed: Failed to deserialize the JSON body into the target type: messages[1]: content should be a string or a list at line 1 column 21736"

Instance 2 (user conversation turn):
Failed to deserialize the JSON body into the target type: messages[1]: content should be a string or a list at line 1 column 77051

Stack Trace

src-BPbHdvxe.js:320:1975 → routeIncomingMessage → dispatchParsedMessage → drainLineQueue

Steps to Reproduce
  1. Include an image in a conversation (AI-generated or user-uploaded)
  2. Wait for model response / thread title generation
  3. Image fails to display; API returns invalid_request_error
Root Cause

When messages[1] contains multimodal content (text + image), the content field serialization does not conform to the API's expected format (content must be a string or a valid content part list). The error occurs at different column positions (21736 vs 77051), indicating the same serialization defect triggers across different request bodies.

Impact
  • Images are completely invisible in conversations
  • Thread title auto-generation fails
  • All conversation turns containing images are affected
Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.