Windows: archiving reopened legacy tasks fails with os error 2

Resolved 💬 2 comments Opened Aug 19, 2026 by David-lh Closed Aug 19, 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.814.41407

What subscription do you have?

ChatGPT subscription (exact tier intentionally omitted because it does not appear relevant)

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

On the Windows desktop app, some older local Codex tasks cannot be archived. Newly created tasks archive successfully, but older tasks fail after they are opened or re-indexed by the current app.

The failure correlates with threads.rollout_path being rewritten from a normal Windows path:

C:\Users\<user>\.codex\sessions\YYYY\MM\DD\rollout-....jsonl

to the Windows extended-length form:

\\?\C:\Users\<user>\.codex\sessions\YYYY\MM\DD\rollout-....jsonl

The archive request returns JSON-RPC error -32603:

failed to archive session: thread-store internal error: failed to archive thread:
The system cannot find the file specified. (os error 2)

The rollout file exists at the normalized path, and PRAGMA integrity_check passes. Every reproduced failure used a rollout_path beginning with \\?\. Newly created tasks using ordinary C:\... paths archived successfully.

What steps can reproduce the bug?

  1. Start with an older local task whose rollout file is under %USERPROFILE%\.codex\sessions.
  2. Open the task, or otherwise cause the current desktop app to re-index it.
  3. In the sidebar, click Archive for that task.
  4. Observe the toast "Unable to archive conversation".
  5. Inspect the task row in state_5.sqlite: rollout_path has been rewritten with a \\?\ prefix even though the source file exists.

Affected legacy tasks observed were created by versions including 0.145.0-alpha.18 and 0.146.0-alpha.3.1.

What is the expected behavior?

The task should be moved from sessions to archived_sessions and marked archived, regardless of whether rollout_path uses a normal drive path or the Windows extended-length prefix.

Additional information

Current task-store/CLI version observed: 0.148.0-alpha.15.
Storage: local task history under %USERPROFILE%\.codex.

Diagnostic evidence:

  • Removing only the \\?\ prefix in threads.rollout_path allowed the same task to archive successfully through thread/archive.
  • After reopening or re-indexing an old task, the app wrote the prefix back and the UI failure returned.
  • No rollout content was missing or corrupt.

Suspected cause:
There appears to be an inconsistency between Windows path canonicalization in the legacy-task loading/indexing path and the file move performed by thread/archive. The loader stores an extended-length Windows path, while the archive implementation appears unable to move the file using that stored path.

Related but not exact duplicates:

  • #28276: generic Desktop archive failure
  • #24178: Windows thread state contains mixed normal and extended-length path spellings

Task titles, conversation contents, user name, thread IDs, and full personal paths have been omitted. This issue was prepared and posted by Codex at the account owner's request.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 9 days ago

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

  • #39378
  • #39239
  • #39209
  • #39150
  • #39130

Powered by Codex Action

David-lh · 9 days ago

Duplicate of #39239