Skip to content

Codex Desktop threads become unreadable after multi-image generation embeds large payloads #46594

Open

Description

@pueblokc

Codex Desktop threads become unreadable after multi-image generation embeds large payloads

What version of the Codex App are you using?

Affected session metadata reports 0.155.0-alpha.2.6. The separately installed CLI currently reports codex-cli 0.153.4.

What subscription do you have?

ChatGPT Pro.

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Two Codex Desktop tasks successfully generated multiple images, but afterward the task conversations became unreadable on both PC and phone. The tasks remain listed, but opening them fails. Other Codex tasks still load normally.

Attempting to read either affected task through the Codex task service returns:

tool call error: tool call failed for codex_app/read_thread

Caused by:
    Mcp error: -32000: MCP error -32000: Codex app tool request failed

The generations themselves completed successfully: all 35 PNGs were recovered locally and validate correctly. The local JSONL transcripts are unusually large because generated-image data appears to be embedded in the conversation records:

  • Task A: 42,000,027 bytes after generating five images.
  • Task B: 205,754,294 bytes after generating thirty images.

The affected tasks have not been deleted or modified.

What steps can reproduce the bug?

  1. In Codex Desktop, start a task that requests several standalone images using the built-in image-generation workflow.
  2. Generate multiple images in the same turn. One affected task generated five images concurrently; the other generated thirty images across the task.
  3. Allow the task to finish normally.
  4. Attempt to reopen the task in Codex Desktop or on mobile, or call codex_app/read_thread for its task ID.
  5. The task fails to load even though it remains in the task list. codex_app/read_thread returns MCP -32000.

The transcript sizes are included above. Full task IDs are withheld from this public report and can be supplied privately to an OpenAI maintainer. The first failure correlated with the transcript containing embedded generated-image payloads.

What is the expected behavior?

Codex should store generated images as referenced artifacts rather than embedding payloads that make the conversation unreadable. Completed image-generation tasks should reopen normally on desktop and mobile, and codex_app/read_thread should return their history.

If a task exceeds a supported history or payload limit, Codex should preserve a readable paginated history and surface a specific recoverable error instead of making the whole task inaccessible.

Additional information

OpenAI Support reviewed these details and described the behavior as consistent with a stuck or oversized thread. The problem reproduces across devices, while other tasks on the same account load normally.

The raw transcripts are 42 MB and 206 MB and contain complete task content plus embedded image payloads, so they are not attached publicly. Sanitized excerpts can be supplied if maintainers identify the exact fields needed.

Activity

  1. added
    bug
    app
    session
    on Sep 19, 2026
  2. github-actions commented on Sep 19, 2026

    @github-actions
    Contributor
  3. FSOTM commented on Sep 28, 2026

    @FSOTM

    Fresh reproduction: generated PNG Base64 is persisted twice per image (Desktop runtime 0.158.0-alpha.2.1)

    Adding measured evidence to this existing issue at the affected user's explicit request. This is a significant usability problem for image-assisted conversations; please prioritize triage and provide a supported recovery path that preserves text history.

    Environment

    • Codex Desktop on Windows, with tools running through WSL and files on Windows-mounted drives.
    • Session metadata: originator: Codex Desktop, cli_version: 0.158.0-alpha.2.1, model_provider: openai.
    • The runtime version above is not the app's About-dialog version. Desktop package version and subscription were not collected.
    • Measurements collected September 29, 2026, Asia/Shanghai (September 28 UTC).

    Reproduction and measurements

    1. In a desktop chat, read a local PNG and use the built-in image generator to redraw it.
    2. Attach another small screenshot (147,065 bytes).
    3. Generate three more ordinary images sequentially in that same chat using the built-in image tool through Code Mode (functions.exec and generatedImage).
    4. After each generation, inspect the local rollout JSONL read-only; compare image payload lengths and SHA-256 hashes without printing image contents.
    Checkpoint Rollout JSONL bytes
    Earlier baseline after redraw and another screenshot 4,024,112
    After additional image 1 8,867,011
    After additional image 2 14,329,337
    After additional image 3 24,006,468

    These are whole-file snapshots, not network measurements. The earlier baseline also precedes intervening text/tool messages, so the first delta is not exclusively image bytes.

    Confirmed duplicate storage

    Each of the four generated images (the initial redraw plus the three additional generations) has identical Base64 stored in two separate durable records:

    • event_msg, payload type item_completed: payload.item.result contains the bare Base64.
    • response_item, payload type custom_tool_call_output: payload.output[1].image_url contains data:image/png;base64, followed by the same Base64.

    Comparing hashes after removing the data-URL prefix confirms byte-identical Base64 in each pair:

    Generated image Base64 bytes per copy SHA-256 prefix, identical in both records
    Initial redraw 1,385,476 fa9649f0253a
    Additional image 1 2,395,092 d3ea098e7659
    Additional image 2 2,726,244 23d5c99b4372
    Additional image 3 4,831,560 8a18707a6765

    The generated PNG artifacts also exist separately on disk. The duplicated Base64 for these four images alone totals 22,676,744 bytes in the rollout, excluding JSON overhead, data-URL prefixes, uploaded/viewed images, and other messages.

    A diagnostic trap: counting only strings beginning with data:image/ incorrectly suggests that each image is stored once. The bare Base64 under payload.item.result must also be counted.

    Impact and limits of this reproduction

    The user reports that image-heavy conversations eventually require tens of MB per interaction, with repeated calls accumulating hundreds of MB and making normal use impractical. They also report resorting to proxy-based handling / relaying content, substantially reduced efficiency, and inaccurate answers during that workflow. These are user-reported impacts: this reproduction verifies local durable duplication and cumulative file growth, not the exact network payload, latency breakdown, or a causal link to answer quality.

    In particular, two copies on disk do not prove that both copies are sent in each model request. Actual request replay should be investigated separately. Related existing reports include #28316, #46761, and #43015.

    Requested maintainer action

    • Confirm whether this precise double-persistence path is tracked by a fix, and identify the fixed version or planned work if available.
    • Store generated artifacts once and use references in durable UI/event history, while preserving any visual input needed at the live model boundary.
    • Investigate aggregate historical image bytes and repeated transmission independently of token counts.
    • Provide a supported way to recover an affected chat or remove obsolete image payloads while preserving its text history; users should not need to deploy a proxy or manually rewrite session files.
    • Add regression coverage for sequential multi-image generation, bounded durable storage, and reopening/resuming the chat.

    Only aggregate measurements, structural field paths, runtime metadata, and abbreviated content hashes are shared here. No raw transcripts, image contents, private local paths, credentials, or session IDs are attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugimagensession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions