[Windows] Automation resume fails on path canonicalization mismatch (`C:\...` vs `\\?\C:\...`)
Open 💬 6 comments Opened May 3, 2026 by Redas17
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
0.128.0
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.19044.0 x64
What issue are you seeing?
Summary
On Windows, Codex Desktop automation fails to start with:
Could not start automation
cannot resume running thread <thread-id> with mismatched path: requested C:\Users\Home\.codex\sessions\...\rollout-....jsonl, active \\?\C:\Users\Home\.codex\sessions\...\rollout-....jsonl
These paths point to the same file, but Codex treats them as different values and refuses to resume the thread.
What steps can reproduce the bug?
Steps to reproduce
- Start an automation attached to an existing thread.
- Stop it.
- Start it again.
- The resume fails with the mismatch error.
Actual behavior
- Automation does not start.
- The same error recurs across multiple automations, not just one thread.
- Restarting Codex, signing out/in, and rebooting the machine do not reliably fix it.
What is the expected behavior?
Expected behavior
- Codex should canonicalize Windows paths before comparing or persisting rollout/session paths.
C:\...and\\?\C:\...should be treated as the same file on Windows.
Additional information
Notes
- This looks related to issue #16994, but that report says
no rollout found. - In this case the rollout/session file exists; the failure happens because the stored path is compared literally and resume is rejected.
- This appears to be an app-level Windows path normalization bug in automation/session resume logic, not an authentication issue.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I hit the same Windows path canonicalization bug in Codex Desktop.
Environment:
Error:
cannot resume running thread 019e2f67-cded-7ec1-b44c-909bf4ea40de with stale path:
requested
C:\Users\Administrator\.codex\sessions\2026\05\16\rollout-2026-05-16T14-09-52-019e2f67-cded-7ec1-b44c-909bf4ea40de.jsonl,active
\\?\C:\Users\Administrator\.codex\sessions\2026\05\16\rollout-2026-05-16T14-09-52-019e2f67-cded-7ec1-b44c-909bf4ea40de.jsonlVerified:
Impact:
The conversation appears in the sidebar but cannot be reopened from Codex Desktop.
the \\?\ vs C:\ mismatch is the classic Windows extended-length path bug. once a path passes through any Win32 canonicalization (GetFinalPathNameByHandleW, std::fs::canonicalize in Rust), it returns as \\?\C:\... while user-typed paths stay C:\... string compare treats them as different files even though they resolve to the same handle. fix is normalizing both sides before compare, not at persist time. dunce::canonicalize strips the verbatim prefix when it's safe. hits every desktop automation framework with persistent session state eventually because the file gets touched at both layers.
I’m hitting this repeatedly on Windows Codex Desktop
OpenAI.Codex_26.513.4821.0.All heartbeat automations can fail with the same stale-path mismatch:
C:\...\codex\sessions\...\rollout-....jsonl\\?\C:\...\codex\sessions\...\rollout-....jsonlI tried several workarounds:
threads.rollout_pathinstate_5.sqliteto\\?\C:\....Recreating/rebinding the target chats appeared to work briefly, but the issue returned. Manual DB normalization also briefly verifies as correct, but Codex later rewrites
threads.rollout_pathback to plainC:\..., then the automation launcher can fail because the active running thread is tracked with\\?\C:\....I had to pause all heartbeat automations because the error toast repeats constantly. This looks like Windows path canonicalization needs to happen before the stale-path comparison, and the current local workarounds are not durable.
I am seeing the same Windows path-canonicalization bug on a newer Codex Desktop build.
Observed repeated error shape:
Extra proof from local logs/binary inspection:
So this still appears to be the local app-server/backend comparing equivalent Windows paths literally.
C:\...and\\?\C:\...should compare equal after Windows path normalization/canonicalization.This is a path-identity bug, not a missing-file bug —
C:\Users\...and\\?\C:\Users\...are the same file, but the resume path comparison is doing a string equality check on the persisted form instead of canonicalizing both sides first. The\\?\extended-length prefix gets written by one code path (usually the one that opened the file with CreateFileW extended syntax) and the plain form by another, so the same rollout is stored under two textual identities.The durable fix is to canonicalize Windows paths (resolve the
\\?\prefix, normalize drive-letter casing, resolve symlinks) before both persisting and comparing. But for anyone blocked right now, the useful diagnostic is to confirm the two forms actually point to the same inode/file on disk — if they do, the rollout is fine and only the comparison is broken.Full disclosure: I maintain codex-rescue (https://github.com/shleder/codex-rescue).
codex-rescue workspace --latestverifies rollout path portability across POSIX / Windows / WSL and specifically detectsC:\vs\\?\C:\identity divergence read-only, so you can confirm your automation's "mismatched path" is a form mismatch (recoverable) rather than a genuinely different file. Alpha7 hardened the Windows extended-path normalization for exactly this class of bug.