Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.930.21537 and 26.1002.52244
What subscription do you have?
Pro
What platform is your computer?
- macOS 27.0.1
- Apple Silicon, 16 GB RAM
- App versions: 26.930.21537 and 26.1002.52244
- Crashes observed: October 5–7, 2026, Pacific time
What issue are you seeing?
The Codex/ChatGPT desktop app repeatedly crashed within seconds of launch.
Eight crash reports showed a consistent main-process failure. A crash dump explicitly reported “process out of memory.”
Investigation found that ~/.codex/.codex-global-state.json was approximately 360 MB. One entry under queued-follow-ups contained a GIF attachment stored as an approximately 357 MB data URL.
Steps to reproduce
The original attachment and queuing sequence has not been reproduced in a clean environment. The observed failure occurred when opening the app with the oversized GIF already persisted in the queue.
Environment
- macOS 27.0.1
- Apple Silicon, 16 GB RAM
- App versions: 26.930.21537 and 26.1002.52244
- Crashes observed: October 5–7, 2026, Pacific time
What steps can reproduce the bug?
The original attachment and queuing sequence has not been reproduced in a clean environment. The observed failure occurred when opening the app with the oversized GIF already persisted in the queue.
What is the expected behavior?
An oversized attachment should be rejected with a clear message. If it is already saved in the queue, the app should open successfully and allow the user to remove or replace it.
Additional information
Recovery and evidence
After backing up the saved state and removing only that GIF attachment, the state shrank to approximately 2.9 MB. The app opened successfully and remained running. The queued message text was preserved.
This strongly suggests the saved attachment triggered memory exhaustion during startup. The exact allocation path was not established.
Suggested improvements
- Validate attachment size before reading or encoding.
- Persist attachment references instead of inline payloads.
- Recover safely from oversized saved queue entries while preserving message text.
Activity
github-actions commentedon Oct 7, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Cayennina commentedon Oct 15, 2026
Additional macOS case with static JPEG and PNG attachments on a newer build, with a targeted recovery recorded on October 12, 2026 (UTC+8). This adds evidence that the persisted-queue failure is not limited to GIFs.
Environment and user impact
com.openai.codex(executable/app name ChatGPT).Persisted state and attachment evidence
~/.codex/.codex-global-state.jsonwas 374,528,501 bytes and parsed successfully as JSON. One thread had one queued message underqueued-follow-ups. Itscontext.imageAttachmentscontained:Both attachment records had
uploadStatus=idle. The queued message accounted for approximately 373.1 MB of the saved state.A retained macOS crash report recorded EXC_BREAKPOINT / SIGTRAP on CrBrowserMain, with Codex Framework / V8 / Node in the stack. This case does not independently establish the exact allocation/serialization failure or an out-of-memory diagnosis.
Targeted recovery actually performed
queued-follow-upsto an empty object, atomically wrote the state, and synchronized its normal.bakcopy.This was a targeted queue reset, not deletion of the entire Codex profile or chat-history database. The before/after result strongly implicates processing of oversized persisted attachments, although a clean-profile reproducer and exact internal cause have not been established.
Please validate size and pixel limits before encoding/persisting attachments, avoid embedding such large payloads in global UI state, and provide a startup recovery path that lets the user remove a problematic queued attachment without losing other work. Reinstalling or rebooting should not leave the user trapped in an unrecoverable launch loop.
Only sanitized diagnostic facts are included here; no original images, private conversation text, account identifiers, or raw state/log files are attached.
yama49 commentedon Oct 18, 2026
Additional macOS evidence for the same oversized queued-attachment startup crash, including a Preview/HEIC copy-paste ingestion path (not a large original GIF upload).
Environment: desktop app
26.1013.40934build20770, bundlecom.openai.codex, macOS26.6.2(25G83), Apple Silicon, 64 GB RAM, Codex Framework155.0.8059.80. Incident: October 18, 2026.User-reported trigger: open a normal-sized HEIC photo in macOS Preview, copy image content/selection, paste into the desktop composer, then submit. The source HEIC is only 4,285,292 bytes, 8064×4536, 10-bit Display P3. The exact clipboard handoff has not been instrumented or repeated after recovery.
Independently verified preserved data:
context.imageAttachments[0].srcas an inline PNG data URL, even though the same attachment also has a temporarylocalPathanduploadStatus: idle.Failure evidence: 15 retained macOS crash reports identify
EXC_BREAKPOINT / SIGTRAPonCrBrowserMain/com.apple.main-thread. A retained direct-launch stderr explicitly reports:The previous local diagnostic record reports these controlled comparisons: a fresh Chromium user-data directory with the affected Codex home still failed; a clean Codex home worked; a reduced copy of the affected home without oversized state worked; adding the affected global-state JSON and its backup restored the failure. I verified the preserved payload and OOM stderr, but did not rerun the destructive startup experiment during this review. The test does not distinguish the primary file from the backup individually.
Read-only shipped-bundle inspection (installation was not patched) found a matching persistence mechanism:
FileReader.readAsDataURL, separately persists pasted file bytes to acodex-clipboard-*temporary file, and retains the fullsrcalongsidelocalPath. The size-admission closure in that particular inspected function returns true; this is not a claim that every upload path lacks limits.updateAndPersist.JSON.stringify, writes the main file plus.bak, and uses temporary-file/rename atomic replacement.JSON.parsebefore per-key validation. That function has no pre-read file-size admission check. It falls back to.bakfor ordinary load failures; a fatal native V8 OOM is not recoverable with an ordinary JS catch.Recovery: backing up/isolation of the oversized queue state and the matching temporary image restored usability. Current state is around 543 KB and the queue is empty. No app binary, global Java/Node runtime setting, or authentication configuration was changed by this review. A first cleanup reportedly recurred; there is insufficient evidence to attribute that recurrence to cloud drafts. Different partial
.tmpsizes show interrupted writes, not necessarily continuous logical payload growth.Requested fixes: enforce byte/pixel budgets before expensive clipboard/image conversion; use file-backed attachment references rather than inline data URLs in global state; bound startup hydration and backup recovery; quarantine an oversized queued item while retaining unrelated conversations and queued text; prevent repeated full-state write amplification.
No private photo, raw global state, raw crash dump, account information, local username/path, conversation ID, or credentials are included. This is a sanitized technical follow-up prepared with assistant help. Related Windows observations: #52912 and #51261.
Shinshin124 commentedon Nov 24, 2026
A November build adds another place to check. On my M3 Pro running 26.1120.41243, I cleared the image queue from
.codex-global-state.jsonand verified it was empty. The desktop app still threwPeer closed MessagePort connection. Four pending messages with inline images were also present in~/.codex/.codex-global-state.sqlite, in thesettingstable underglobal/queued-follow-ups. Removing the four pending messages from that conversation with the app fully quit let me open my original profile from the Dock again. The earlier GIF and HEIC cases here helped identify what to look for. Read-only size check and recovery details.