Windows 11: Codex Desktop 26.513.31313 shows “Oops, an error has occurred” when resuming existing thread
What version of the Codex App are you using (From “About Codex” dialog)?
26.513.31313
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Since updating Codex Desktop today to version 26.513.31313, I can no longer reliably resume an existing thread from the Desktop app.
When I select an existing thread/conversation from the sidebar/history, the app shows a generic error screen:
Oops, an error has occurred
The thread does not resume successfully.
This started after installing the latest desktop update today. I did not knowingly change my workspace, session files, or Codex configuration at the same time.
What steps can reproduce the bug?
- Use Codex Desktop on Windows 11.
- Update to version
26.513.31313. - Open Codex Desktop.
- Select an existing thread/conversation from the sidebar/history.
- Attempt to resume that thread.
- Observe the generic “Oops, an error has occurred” error screen.
What is the expected behavior?
Selecting an existing thread should resume it normally in Codex Desktop.
The app should either:
- reopen the existing thread successfully, or
- show a specific actionable error if the local session cannot be resumed.
Additional information
This looks possibly related to recent Windows resume/session-state issues:
- #21659
- #22854
- #21761
- Possibly related history/sidebar/session hydration issues mentioned in #22438
I am not sure whether this is the same root cause, but the behavior appears to be in the same area: resuming existing Desktop threads on Windows after a recent update.
If helpful, I can provide logs. Please let me know which log file/location would be most useful.
13 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
@simon-ami
Hi, I fixed the issue locally and created another issue thread for reference. You can send this solution to your Codex app.
https://github.com/openai/codex/issues/22985
Thanks, I see the analysis in #22985, but I don’t see an actual patch, script, or exact repair command there.
Could you share the specific script/commands you used, or a minimal before/after example of one affected JSONL entry?
I’d also prefer to avoid bulk-editing
%USERPROFILE%\.codex\sessionswithout a backup and without maintainer confirmation, since an overly broad replacement could corrupt local history.Here is my fix. Unfortunately, this parsing error requires modifying %USERPROFILE%\.codex\sessions, so we should back it up first.
Hope this helps, or at least gives you a starting point.
Update: confirmed workaround for my affected session.
Codex Desktop
26.513.31313on Windows 11 was consistently failing to resume one specific session (from my sparse testing):019e276d-6c96-74b0-8349-110889972d3cThe session file itself was valid JSONL:
also appeared for other sessions that resumed successfully, so that does not seem to be the direct cause.
The failing session contained directive-shaped assistant output with Windows backslash paths in directive
cwdattributes, matching the pattern described in #22985. A narrow one-file repair changed only those directivecwdpaths from backslashes to forward slashes. It changed 21 directivecwdpaths. After re-validating the JSONL and fully restarting Codex Desktop, the previously broken session resumes successfully.So this looks like a Desktop history renderer/parser issue triggered by directive-shaped text containing Windows
cwdpaths, rather than general session corruption.Thanks, confirmed. Your diagnosis was correct for my case.
I found 21 directive
cwdattributes with Windows backslash paths in the failing session JSONL. After backing up the file, converting only those directivecwdpaths to forward-slash paths, and validating the JSONL again, the thread resumes successfully after restarting Codex Desktop.I have an additional data point from a local mitigation that consistently restored the broken pre-upgrade threads on my machine.
This was done with a sanitized local compatibility repair, not by recreating threads and not by recovering from backups.
Observed repair rule:
~/.codex/session_index.jsonlto identify user-visible local thread IDs.~/.codex/sessions/**/rollout-*.jsonl.type == "session_meta"payload.idis present insession_index.jsonlpayload.thread_sourceis missing or emptypayload.thread_source = "user"Important safety constraint:
thread_sourcefor every rollout on diskthread_sourcevalues such as subagent threadsMinimal sanitized Python version of the local repair logic:
This local repair fully restored the old broken threads for me.
Additional verification from the repaired dataset:
I also wrote local tests for this repair rule before applying it, covering:
thread_sourcegets repairedsession_index.jsonlis not modifiedthread_sourceis preservedThis is obviously only a mitigation, not the correct product fix. But it strongly suggests the app should either:
thread_sourceon older local rollout metadata as a backward-compatibleuserdefault when appropriate, orI can confirm that this issue also occurs on my computer in Codex Desktop version 26.513.31313, as mentioned in this thread.
In my case, the bug makes the Codex Desktop app effectively unusable, so I would consider this a major regression that needs an urgent fix from OpenAI.
I also experienced the same problem with a newly created thread while the agent was actively working. The thread crashed and now shows the same “Oops, an error has occurred” message when I try to reopen it.
confirm, stumbled upon same bug on latest version of Codex Desktop on Windows 26.513.31313
This worked for me too.
We're working on a hotfix for this. The update should be available in the Windows store shortly.
I have the same issue on Windows 11 after updating to 26.513.31313. Sessions crash after a while and become inaccessible.
We've issued a hotfix to address this. Please update to the latest version.