Skip to content

Bug: Multimodal message serialization error causes images to not display #35544

Description

@baixingzhu6-tech

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingimagen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions