I’m hitting a hard crash in the Codex desktop app on macOS where certain chat windows throw a JavaScript error in the main process. Once it starts, the dialog reappears every time I click OK — holding Enter or repeatedly dismissing it does nothing, and the app becomes unusable until I force quit. I cannot open up that window anymore, I have to archive it, and sort through my image renders afterwards and rename or sort things.
Is this a problem anyone else is having and are there any known fixes? I searched this forum but wasn’t sure that I was finding anything.
The error dialog reads:
A JavaScript error occurred in the main process
Uncaught Exception:
RangeError: Invalid string length
at WF.write (/Applications/Codex.app/Contents/Resources/app.asar/.vite/build/src-uFOVO82H.js:364:21)
at Socket.onStdoutData (/Applications/Codex.app/Contents/Resources/app.asar/.vite/build/src-uFOVO82H.js:364:4174)
at Socket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
at Readable.push (node:internal/streams/readable:394:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
RangeError: Invalid string length is V8’s maximum-string-length limit, so it looks like onStdoutData is accumulating subprocess stdout into a single string that grows past the cap and crashes the main process. Because the affected window keeps trying to process that same oversized buffer, the crash loops on every reopen/click.
The environment is MacOS silicon, with the desktop app – I always update it - it’s happened on many version updates in the last month)
You are welcome to discuss Codex issues on the forum, however the official place to report and track them is the GitHub issue tracker for OpenAI Codex.
I had ChatGPT look for the closest related issue and it identified:
If that issue matches your problem, consider adding a reaction on the GitHub issue page itself, not just on the forum topic, as reactions on GitHub help the developers gauge impact and prioritize work.
If it is not the same issue, try searching the existing GitHub issues for a closer match. If you cannot find one, then open a new issue with as much detail as possible.