Skip to content

Codex Desktop: read_thread ignores output suppression and returns multi-megabyte imageGeneration payloads #39148

Open

Description

@atlys-hein

What version of the Codex App are you using?

Codex app 26.810.52044 (build 6662), bundled CLI/app-server 0.148.0-alpha.9.

What subscription do you have?

Pro.

What platform is your computer?

macOS 26.5.2, arm64.

What issue are you seeing?

The agent-facing read_thread tool ignores includeOutputs: false and maxOutputCharsPerItem for imageGeneration items. A one-turn read returned multi-megabyte base64 image results even though outputs were disabled and each item was capped at 1,000 characters.

Measured response:

  • request: read_thread({ includeOutputs: false, maxOutputCharsPerItem: 1000, turnLimit: 1 })
  • total serialized response: 3,809,394 bytes
  • largest returned items:
    • imageGeneration: approximately 1,400,510 bytes
    • imageGeneration: approximately 1,318,716 bytes
    • imageGeneration: approximately 1,047,733 bytes
  • each item included the result field containing the generated-image payload

The call completed after the history was migrated to paginated storage, but the oversized response remained. This can flood the model/tool boundary and appears correlated with recurring list_threads, read_thread, and archive calls that remain pending in sidebar-cleanup automations.

Steps to reproduce

  1. Use a Codex task whose most recent turn contains one or more completed image-generation tool results.

  2. From another task, call:

    read_thread({
      threadId: "<thread>",
      includeOutputs: false,
      maxOutputCharsPerItem: 1000,
      turnLimit: 1
    })
    
  3. Measure the serialized response and inspect the returned item keys.

  4. Observe that imageGeneration items still contain the full result payload and exceed the requested per-item maximum by several orders of magnitude.

Expected behavior

When includeOutputs is false, binary/generated-image result payloads should be omitted. When a maximum output size is supplied, it should apply to every returned item type, including imageGeneration.

The response should retain small metadata such as item type, status, revised prompt, and saved path if appropriate, without embedding the full generated image.

Actual behavior

Full generated-image payloads are returned in imageGeneration.result. maxOutputCharsPerItem does not constrain them.

Additional information

Private paths, prompts, task titles, IDs, and image data are intentionally omitted.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    app-serverIssues involving app server protocol or interfaces
    on Aug 18, 2026
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

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions