You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Windows] Automation resume fails on path canonicalization mismatch (C:\... vs \\?\C:\...) #20882
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 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.
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.jsonl
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.
rebinding the automations to the fresh thread IDs;
manually normalizing threads.rollout_path in state_5.sqlite to \\?\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_path back to plain C:\..., 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.
Version: OpenAI.Codex 26.519.5221.0
OS: Windows 11
Observed repeated error shape:
cannot resume running thread <thread-id> with stale path:
requested `C:\Users\<user>\.codex\sessions\...\rollout-....jsonl`,
active `\\?\C:\Users\<user>\.codex\sessions\...\rollout-....jsonl`
Extra proof from local logs/binary inspection:
AppServerConnection routed method=thread/resume from originWebcontentsId=1 and returned errorCode=-32600
electron-message-handler reported Request failed method=thread/resume
resources\codex.exe contains "cannot resume running thread" and "stale path"
resources\app.asar does not contain those strings
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.
Activity
github-actions commentedon May 3, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
C:\...and\\?\C:\...session paths are treated as different #20626Powered by Codex Action
seasonmsg commentedon May 16, 2026
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.
m13v commentedon May 16, 2026
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.
grantusmaximus commentedon May 19, 2026
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.
rkoivunen-sw commentedon May 25, 2026
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.