Repository navigation
Description
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:
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: [macOS Desktop plus Android Remote] list threads reaches app server but never completes; UI sidebar remains healthy. #38571 and [App][Scheduled Tasks] Thread-management calls hang until a foreground message is sent #37556.
Private paths, prompts, task titles, IDs, and image data are intentionally omitted.
Activity
aidawilliam41-ops commentedon Nov 12, 2026
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.