Repository navigation
Description
Summary
Codex Desktop on Windows repeatedly makes image-generating threads unrecoverable because full PNG Base64 remains inline in the rollout and is also returned by task-inspection APIs.
This workflow has now stalled three times. Two clean recovery threads were created without forking or reading the earlier image-heavy threads, but each recovery became unusable again after it generated images.
The newest recovery produced only 5 PNG files (6,098,757 bytes total on disk), yet its rollout grew to 33,133,290 bytes and its latest turns ended as interrupted. The thread is now idle with no assistant reply.
A particularly important additional repro is that read_thread(includeOutputs=false) still returns the full imageGeneration.result Base64 field.
Environment
- Codex Desktop MSIX:
OpenAI.Codex_26.818.5345.0_x64__2p2nqsd0c76g0 - Bundled CLI:
codex-cli 0.149.0 - Platform: Windows 11 x64,
Microsoft Windows NT 10.0.26200.0 - Local project thread
- Image tool: built-in ImageGen
Repeated recovery timeline
- An original UI-design thread generated images and became unresponsive.
- A first diagnostic/recovery workflow was created. Its affected rollout reached 72,799,230 bytes.
- A clean first recovery thread was created without reading/forking the old history. Its rollout reached 17,682,727 bytes.
- A clean second recovery thread was created with explicit instructions never to read the old threads. It generated 5 PNGs and its rollout reached 33,133,290 bytes.
- That second recovery then stalled while attempting the next image. The latest two turns are
interrupted; the newest ran for 141 seconds and ended with no assistant message or tool marker. - A third clean migration is now required.
The clean recoveries did not inherit the previous task history. They reproduced the problem after new ImageGen calls, so the failure is not limited to reopening one already-corrupted thread.
Task-inspection evidence
Reading only the latest turns of the affected thread produced unexpectedly huge responses:
includeOutputs=true
Request shape:
read_thread(
turnLimit=10,
includeOutputs=true,
maxOutputCharsPerItem=16000
)
Observed result:
Warning: truncated output
original token count: 2,129,388
The response contained complete PNG Base64 in imageGeneration.result, despite the generated image already having a separate savedPath.
includeOutputs=false
Request shape:
read_thread(
turnLimit=4,
includeOutputs=false,
maxOutputCharsPerItem=4000
)
Observed result:
Warning: truncated output
original token count: 391,951
The response still contained the complete imageGeneration.result Base64. Therefore includeOutputs=false and maxOutputCharsPerItem do not protect callers from image payloads.
Steps to reproduce
- Start a new local Codex Desktop task on Windows.
- Generate and save several PNG UI mockups with built-in ImageGen.
- Continue the task for a few turns. In this case, only 5 generated images were enough for the task to become unreliable.
- Inspect the rollout JSONL and confirm full PNG Base64 is stored inline in image-generation records while the PNG also exists under the generated-images directory.
- Call
read_threadfor recent turns withincludeOutputs=falseand a smallmaxOutputCharsPerItem. - Observe that the response still includes the complete
imageGeneration.resultBase64 and becomes hundreds of thousands of tokens. - Continue or resume the affected task.
- Observe long-running turns ending as
interrupted, eventually leaving the taskidlewithout a reply. - Create a clean migration task that does not fork or read the affected history, generate several new images, and observe the problem recur.
Expected behavior
- Generated image bytes should be externalized and referenced by asset ID, hash, or
savedPath, rather than duplicated inline in rollout history. read_thread(includeOutputs=false)must omit binary/image payloads.maxOutputCharsPerItemshould cap or replace oversizedimageGeneration.resultfields.- Resuming a thread should not hydrate all historical image Base64 into model or UI context.
- Codex should warn when a task becomes image-heavy and provide a built-in compact/repair path.
- A task should remain usable after several generated images.
Actual behavior
- Full PNG Base64 is retained inline even after the image is saved separately.
- Task inspection returns the Base64 even when outputs are explicitly disabled.
- A thread with only 5 generated PNGs can grow to tens of MB and later end turns as
interrupted. - Clean recovery tasks reproduce the issue, forcing repeated migrations and losing continuity.
Suggested fixes
- Store generated image data in a blob/asset store and keep only metadata plus
savedPath/asset ID in rollout JSONL. - Make
includeOutputs=falseremoveimageGeneration.resultand any nested data URLs. - Apply
maxOutputCharsPerItemrecursively to tool and image-generation result fields. - Deduplicate image bytes across response items, event messages, and compaction records.
- Add a built-in “compact image payloads” repair action for existing tasks.
- Add regression coverage for repeated ImageGen calls followed by
read_thread(includeOutputs=false).
Related issues
- macOS Desktop: image-heavy thread takes minutes to open because rollout JSONL embeds generated image payloads inline #22603 — image-heavy rollout embeds generated image payloads inline
- Codex Desktop hangs when opening an image-heavy session rollout (~183 MB, huge inline image_url records), and the thread becomes hard to recover from the sidebar #24676 — Windows Desktop hangs on an image-heavy rollout
- Codex app-server reaches 27 GB footprint and 36 GB swap after compacted records grow one rollout JSONL to 10.2 GB with repeated inline PNG data URLs #34863 — repeated inline PNG data in compacted records causes extreme rollout and memory growth
- Large active session causes global freezes with no UI attribution #21948 — large active session causes global freezes
This report adds a current Windows version, a small-image-count reproduction, repeated failure across clean recovery tasks, and the read_thread(includeOutputs=false) payload leak.
Privacy note
The raw rollouts, prompts, local paths, thread IDs, and generated images contain private project data and are intentionally omitted. Sanitized sizes, statuses, and API behavior are included above.
Activity
github-actions commentedon Aug 23, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
JayLuoShui commentedon Sep 16, 2026
Additional evidence on Windows desktop 26.908.9136.0: a much larger image-heavy task causes repeated renderer crashes and UI reloads, and a bounded
read_threadcall fails withInvalid string length.Environment
10.0.26200.26.908.9136.0.26.908.70816.152.0.7977.83; app-server:0.154.0-alpha.6.2.Observed failure
Opening/loading an existing image-heavy local task repeatedly makes the interface reload, which looks like an application restart. Two Crashpad records were captured approximately 56 seconds apart:
{"capture_kind":"crash","osarch":"x86_64","ptype":"renderer"}The main application process and
codex.exeapp-server retained their original PIDs and creation times throughout. The application log recordsReact root render requestedimmediately after the first crash. This is a renderer failure/recovery, not a whole-app or Windows restart.During the minute preceding the first crash, the primary interface received 29
thread/items/listresponses for the affected task, and logged 45 occurrences of:These are correlated observations, not proof that ResizeObserver itself causes the native crash.
Read-only history measurements
imageGenerationitemspaginatedAn inspected image item had a
resultstring of 2,408,920 characters, alongside asavedPathfield. Measurements were taken using read-only SQLite aggregate queries; no history was edited or deleted.Bounded inspection also fails
From another task, this call returned the tool error
Invalid string length:The call did not return a payload that could be inspected, so this incident alone does not prove exactly where output suppression failed. It demonstrates that those bounds do not guarantee successful bounded inspection of this task.
Interpretation and desired recovery
This strongly implicates image-history loading/retention pressure. However, no renderer minidump or explicit renderer OOM reason was retained, so the precise crash cause is not confirmed. A clean-profile minimal reproduction has not been produced.
Please provide bounded history hydration and metadata-only inspection, keep large image results out of routine history responses, and support opening an oversized task without reloading all image payloads. Existing image data should be preserved and externalized/deduplicated rather than discarded.
Related renderer-recovery reports: #44787 and #34890. Related output-suppression report: #39148. The observed renderer incident is separate from the large-PDF main-process OOM documented in #42730.
This public report excludes original images, prompts, task/project titles, thread IDs, local user paths, raw logs, account identifiers and crash IDs. No private rollout or database is attached.