macOS Desktop: image-heavy thread takes minutes to open because rollout JSONL embeds generated image payloads inline
What version of the Codex App are you using?
Codex Desktop 26.506.31421 on macOS. App bundle:
CFBundleShortVersionString:26.506.31421CFBundleVersion:2620- Bundle ID:
com.openai.codex - Session meta in rollout:
cli_version: 0.130.0-alpha.5,originator: Codex Desktop
What platform is your computer?
macOS 26.5 (25F71), Apple Silicon / arm64.
What issue are you seeing?
Opening one Codex Desktop thread for a local repo with many generated images made the Desktop app appear to crash or become unresponsive. It eventually opened after several minutes, but the thread was heavy enough that normal Desktop use became painful.
Local diagnosis shows the session trace stores full image bytes inline, even though the generated image files are also written separately under ~/.codex/generated_images/.
Measured local data for the affected thread:
~/.codex/sessions/2026/05/11/rollout-<thread-id>.jsonl:747 MB- JSONL record count:
2,164 - Matching
~/.codex/generated_images/<thread-id>/:82PNG files,240 MB 82generated images appear to be stored twice in the JSONL: once asevent_msg/payload.type == image_generation_end, and once asresponse_item/payload.type == image_generation_call164JSONL records contain multi-megabytepayload.resultbase64 PNG strings35additionalfunction_call_outputrecords contained embeddedinput_image.image_url: data:image/...;base64payloads191JSONL lines were larger than1 MB; the oversized lines accounted for most of the rollout file
Manual recovery confirmed the root cause. Redacting only embedded image payloads while preserving all JSONL records and metadata reduced the rollout file from 747 MB to 2.3 MB:
- replace
payload.resultforimage_generation_end/image_generation_callwith a short placeholder - replace nested
image_urlvalues beginning withdata:image/with a short placeholder - keep
saved_path, call ids, prompts, timestamps, and all other metadata intact - validate JSONL with
jq -e .
After this trim, the file still had the same 2,164 records and no JSONL line above 1 MB.
This looks related to, but not exactly the same observed platform, as:
- https://github.com/openai/codex/issues/22004
- https://github.com/openai/codex/issues/21232
- https://github.com/openai/codex/issues/21948
I am filing this as a macOS Desktop datapoint with exact local measurements. Feel free to close as duplicate if the intended fix is tracked elsewhere.
Steps to reproduce
- Use Codex Desktop on macOS.
- In one thread, generate dozens of images, enough to create many records with
payload.type == image_generation_endandpayload.type == image_generation_call. - Confirm the rollout JSONL grows into hundreds of MB because generated images are embedded as base64 in
payload.resultwhile also being saved under~/.codex/generated_images/<thread-id>/. - Close/reopen Codex Desktop or select that thread.
- Observe that opening the thread can freeze/hang the Desktop UI for minutes or make it appear to crash.
Expected behavior
Codex Desktop should stay responsive when opening image-heavy threads. Generated image bytes should not be duplicated inline in the session rollout if they are already stored as files, or the loader should lazy-load/stream/skip oversized binary payloads safely.
At minimum, Desktop should detect oversized image-heavy sessions, show a clear warning, and provide a built-in way to compact/trim embedded images without forcing users to manually edit ~/.codex/sessions.
Actual behavior
The Desktop app attempts to load/hydrate a hundreds-of-MB rollout file with many inline base64 image payloads, causing the UI to become unresponsive for minutes when opening the thread.
Privacy note
I intentionally omitted the raw rollout file, prompts, local username, full thread id, generated images, and repo contents from this public report. The important reproducible signal is the data shape and sizes above.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗