Skip to content

Codex Desktop Windows - resume fails because same session path is compared in two Windows path formats. #23311

Closed

Description

@ysc0224
cannot resume running thread 019e20bb-ae59-7d63-9991-a424667fd584 with stale path: requested `C:\Users\USER\.codex\sessions\2026\05\13\rollout-2026-05-13T18-47-11-019e20bb-ae59-7d63-9991-a424667fd584.jsonl`, active `\\?\C:\Users\USER\.codex\sessions\2026\05\13\rollout-2026-05-13T18-47-11-019e20bb-ae59-7d63-9991-a424667fd584.jsonl`

Error:
cannot resume running thread with stale path:
requested C:\Users\USER\.codex\sessions\...jsonl,
active \\?\C:\Users\USER\.codex\sessions\...jsonl

Expected:
Codex should normalize both paths before comparing, because they refer to the same session file.

Observed:
Scheduled automation fails to resume thread with stale path.

Environment:

  • Windows version: Windows 11 Pro
  • Codex Desktop version: 26.513.40821

++++++++++++++++++++++++++

even though 2 days ago
etraut-openai
said
"We've issued a hotfix to address this. Please update to the latest version."

it is still happening.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    windows-osIssues related to Codex on Windows systems
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on May 18, 2026
  2. jackyshan82 commented on May 19, 2026

    @jackyshan82

    v26.513 did not fix the issue.

  3. Delta-Water commented on May 20, 2026

    @Delta-Water

    I am seeing the same bug on Windows with Codex Desktop after the reported hotfix.

    Environment observed locally:

    • Codex Desktop: 26.513.40821
    • Session log / app-server CLI version: 0.131.0-alpha.9
    • Platform: Windows, local Codex data under %USERPROFILE%\.codex
    • Affected scenario: heartbeat automations / reopening automation target threads

    Representative error:

    cannot resume running thread <thread-id> with stale path:
    requested `C:\Users\<user>\.codex\sessions\2026\05\20\rollout-2026-05-20T10-15-46-<thread-id>.jsonl`,
    active `\\?\C:\Users\<user>\.codex\sessions\2026\05\20\rollout-2026-05-20T10-15-46-<thread-id>.jsonl`
    

    A few details that may help narrow it down:

    1. Restarting Codex Desktop did not clear the problem.
    2. The affected rollout-*.jsonl files existed and were readable; this was not a missing rollout file.
    3. The corresponding rows in %USERPROFILE%\.codex\state_5.sqlite had threads.rollout_path stored in normal Windows form:
    C:\Users\<user>\.codex\sessions\...\rollout-...jsonl
    

    while the runtime active path in the error used the extended Windows prefix:

    \\?\C:\Users\<user>\.codex\sessions\...\rollout-...jsonl
    
    1. Manually backing up state_5.sqlite and updating the affected threads.rollout_path values to the \\?\C:\... form made those paths match the active path and appears to mitigate the issue locally.
    2. This reproduced even after the automations were paused, so the immediate trigger was not only the heartbeat interval. The stale-path check can still fail when trying to resume/reopen an existing target thread whose persisted rollout path and active rollout path are spelled differently.

    Expected behavior remains that Codex should compare canonical file identity / normalized Windows paths instead of doing a literal string comparison between C:\... and \\?\C:\....

  4. JohnAlcatraz commented on May 20, 2026

    @JohnAlcatraz

    I see the same bug, session paths now have that weird \?\ in front of them

  5. etraut-openai commented on Jun 5, 2026

    @etraut-openai
    Contributor

    Thanks for the report. This was a valid bug: Codex compared the two Windows path representations without normalizing them first.

    The issue has now been fixed by #25509. The fix is included in Codex CLI 0.137.0-alpha.4 and later. Please update Codex Desktop to a version containing that CLI release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appautomationsbugSomething isn't workingsessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions