Codex Desktop: read_thread ignores output suppression and returns multi-megabyte imageGeneration payloads
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,394bytes - largest returned items:
imageGeneration: approximately1,400,510bytesimageGeneration: approximately1,318,716bytesimageGeneration: approximately1,047,733bytes- each item included the
resultfield 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
- Use a Codex task whose most recent turn contains one or more completed image-generation tool results.
- From another task, call:
``text``
read_thread({
threadId: "<thread>",
includeOutputs: false,
maxOutputCharsPerItem: 1000,
turnLimit: 1
})
- Measure the serialized response and inspect the returned item keys.
- Observe that
imageGenerationitems still contain the fullresultpayload 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 --jsonreports rollout/state parity with no missing, stale, duplicate, or malformed records.- The source thread was completed and successfully migrated with the built-in
migrate-rolloutscommand, 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.