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
    bug
    app
    app-server
    on Aug 18, 2026
  2. aidawilliam41-ops commented on Nov 12, 2026

    @aidawilliam41-ops

    Additional historical Windows evidence: Codex user messages bypass the per-item length control

    This adds a text-input case to #39148's imageGeneration-output case; a shared internal cause is not established.

    On September 28, 2026, Codex Desktop for Windows 26.924.22138, build 11645, returned a 225,197-character userMessage text from a one-turn read using:

    read_thread({threadId:"",turnLimit:1,includeOutputs:false,maxOutputCharsPerItem:1200})

    The serialized response measured 234,400 JavaScript string characters. The user text had no truncation indicator. Only lengths and field names were emitted during verification; no private message is included here. The existing source record independently confirmed the text length.

    Inspection of that installed build found that the Codex userMessage, agentMessage, command, and tool-argument branches bypassed the truncation helper. Selected reasoning and tool-output fields used it. The user-message branch alone explains this measured case; this is not evidence that every named branch produced an oversized live response.

    Impact: a seemingly constrained history read can return a very large prompt and consume downstream context if forwarded verbatim. An actual billing error, context-loss incident, or task failure was not established.

    Please expose explicit message/input length controls and an aggregate response budget, with truncation metadata, and clarify whether the existing option's reference to "chat message" covers Codex messages. includeOutputs:false correctly excludes its designated output fields; it does not promise to suppress user inputs. The current option is per item, not a promised total-response cap.

    This is verified historical evidence. Recurrence on the current release has not been tested.

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

    appapp-serverbugimagenperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions