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

Open 💬 0 comments Opened Aug 18, 2026 by 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:

``text
read_thread({
threadId: "<thread>",
includeOutputs: false,
maxOutputCharsPerItem: 1000,
turnLimit: 1
})
``

  1. Measure the serialized response and inspect the returned item keys.
  2. 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

  • State and thread-history databases pass PRAGMA quick_check.
  • codex doctor --json reports rollout/state parity with no missing, stale, duplicate, or malformed records.
  • The source thread was completed and successfully migrated with the built-in migrate-rollouts command, so the behavior is not limited to unmigrated legacy history.
  • Related task-management hang family: #38571 and #37556.

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

View original on GitHub ↗