Skip to content

Codex Desktop heartbeat automation cannot resume thread on Windows due to stale path mismatch between normal path and \\?\ path #25237

Closed as duplicate

Description

@xyzxyq

What version of the Codex App are you using (From “About Codex” dialog)?

26.527.31326

What subscription do you have?

plus

What platform is your computer?

No response

What issue are you seeing?

Bug:
Heartbeat automation fails to start/resume the thread with a stale path error.

Error message:
cannot resume running thread 019e67c6-dfa0-7202-9627-2df038f275dd with stale path: requested C:\Users\..\.codex\sessions\2026\05\27\rollout-2026-05-27T12-52-33-019e67c6-dfa0-7202-9627-2df038f275dd.jsonl, active \\?\C:\Users\..\.codex\sessions\2026\05\27\rollout-2026-05-27T12-52-33-019e67c6-dfa0-7202-9627-2df038f275dd.jsonl

What steps can reproduce the bug?

Reproduction:

  1. Create a heartbeat automation attached to the current Codex Desktop thread.
  2. Let the automation trigger.
  3. Codex attempts to resume the thread.
  4. Resume fails with the stale path mismatch shown above.
  5. Deleting and recreating the heartbeat automation with the same current thread still fails, because the same target_thread_id resolves to the same mismatched path pair.

What is the expected behavior?

Expected behavior:
The heartbeat automation should resume the active thread successfully. On Windows, these two paths refer to the same file and should be normalized before comparison:

  • C:\Users...codex\sessions...
  • \?\C:\Users...codex\sessions...

Actual behavior:
Codex treats the two equivalent Windows paths as different and refuses to resume the thread as stale.

Additional information

Workaround:
Deleting the heartbeat automation and recreating it as a local cron automation avoids the issue because cron does not resume the current thread:

  • kind = "cron"
  • execution_environment = "local"
  • cwd = project workspace path

Impact:
Thread heartbeat automations are unusable on this Windows thread. Long-running training supervision had to be moved to cron automation instead.

Activity

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

    @ETdoFresh

    +1

    Local MacOS Client:
    Macbook Pro M1 ... Codex Version 26.601.21317 • Released Jun 2, 2026

    Remote Windows Session:
    Codex Version 26.601.21317 • Released Jun 2, 2026

    Error:
    Failed to resume chat
    cannot resume running thread 019e84f6-58e2-7280-a8d3-ca4aa56ee2e5 with stale path: requested C:\Users\username\.codex\sessions\2026\06\01\rollout-2026-06-01T15-53-22-019e84f6-58e2-7280-a8d3-ca4aa56ee2e5.jsonl, active \\?\C:\Users\username\.codex\sessions\2026\06\01\rollout-2026-06-01T15-53-22-019e84f6-58e2-7280-a8d3-ca4aa56ee2e5.jsonl

  4. Sapientropic commented on Jun 28, 2026

    @Sapientropic

    I can reproduce this on Windows with a thread heartbeat automation as well, not only manual chat resume.

    Environment:

    • Windows x64
    • Codex Desktop package: OpenAI.Codex_26.513.4821.0_x64__2p2nqsd0c76g0
    • codex --version: codex-cli 0.130.0

    Repro shape:

    1. Create a kind = "heartbeat" automation attached to an existing thread.
    2. Try to start/run the automation from the automations UI.
    3. The automation fails before the thread wakes.

    Error, sanitized:

    Could not start automation
    cannot resume running thread <thread-id> with stale path:
    requested `<CODEX_HOME>\sessions\YYYY\MM\DD\rollout-...-<thread-id>.jsonl`,
    active `\\?\<CODEX_HOME>\sessions\YYYY\MM\DD\rollout-...-<thread-id>.jsonl`
    

    Local inspection shows both paths point to the same file; size and mtime match. The active thread record stores the extended-length Windows path (\\?\...), while the automation resume request appears to use the normal drive path. This makes heartbeat automations fail to wake the existing thread, so scheduled thread automations silently miss their intended run until manually inspected.

    Expected behavior: resume should canonicalize/equate normal drive paths and Windows extended-length paths before the stale-path comparison, especially for heartbeat automation resume.

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