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

Resolved 💬 3 comments Opened May 30, 2026 by xyzxyq Closed Aug 6, 2026
💡 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)?

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.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #24338
  • #24944
  • #24697
  • #23803
  • #24178

Powered by Codex Action

ETdoFresh · 2 months ago

+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

Sapientropic · 2 months ago

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.