Codex Desktop on Windows crashes with RangeError: Invalid string length when opening a specific task card before the task starts
What version of the Codex App are you using (From “About Codex” dialog)?
26.513.4821.0
What subscription do you have?
chatgpt plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex Desktop crashes with a JavaScript main-process error when opening a specific task card. The task does not need
to start running. The crash happens while the app is rendering/loading the task content.
Affected conversation ID:
019e44a4-96d3-7e42-afd7-94aab09a3bb4
Error dialog:
```text
A JavaScript error occurred in the main process
Uncaught Exception:
RangeError: Invalid string length
at fd.write (...)
at Socket.onStdoutData (...)
at Socket.emit (node:events:509: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)
Relevant local log entries with PII redacted:
2026-05-20T09:23:21.207Z error [electron-message-handler] Item not found in turn state
itemId=call_e8g1oRJmjPYq9zz3NjY9ltjn
2026-05-20T09:23:29.786Z info [electron-message-handler] turn_completed_with_incomplete_plan completedPlanStepCount=4
conversationId=019e44a4-96d3-7e42-afd7-94aab09a3bb4 planStepCount=5 turnId=019e44a7-2972-76d2-bc35-27851444a31e
2026-05-20T09:35:25.851Z info [AppServerConnection] response_routed broadcastFallback=false conversationId=019e44a4-
96d3-7e42-afd7-94aab09a3bb4 durationMs=1 errorCode=null hadInternalHandler=false hadPending=true method=turn/start
This appears to be a desktop UI/state handling issue rather than a task execution failure. The crash occurs while
opening/rendering the task card.
What steps can reproduce the bug?
- Open Codex Desktop on Windows.
- Open the task list.
- Click a specific existing task card.
- Do not start or resume the task.
- While Codex Desktop is displaying/loading the task content, the JavaScript main-process error dialog appears.
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗