# [Windows] Unable to archive threads when `rollout_path` contains `\\?\` prefix

Open 💬 4 comments Opened Aug 19, 2026 by qingbai-zzy
💡 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.5167.0

What subscription do you have?

plus

What platform is your computer?

win11

What issue are you seeing?

[Windows] Unable to archive threads when rollout_path contains \\?\ prefix

Description

On Codex Desktop for Windows, some existing threads cannot be archived.

When I click Archive from the sidebar, Codex always shows:

Unable to archive conversation

The affected conversations are already finished and are not running any active task.

Other conversations can be archived normally, so this does not appear to be a general account or archive-permission issue.

I reproduced the problem on two separate threads.

Environment

  • OS: Windows
  • Product: Codex Desktop
  • Codex version: latest version available to me as of August 19, 2026
  • CODEX_HOME: default %USERPROFILE%\.codex

Affected threads included:

01a012d5-...-bf328746b8d8
01a013e3-...-e3cf8eb052e0

Both showed the same behavior.

Actual behavior

For an affected thread:

  1. The conversation appears normally in the Codex sidebar.
  2. The task has already completed.
  3. Clicking ... -> Archive shows Unable to archive conversation.
  4. Restarting Codex does not help.
  5. Signing out and signing back in does not help.
  6. Updating Codex Desktop does not help.
  7. Repeated archive attempts continue to fail.

The corresponding rollout file remains under:

%USERPROFILE%\.codex\sessions\

and does not appear under:

%USERPROFILE%\.codex\archived_sessions\

Diagnostics

I inspected the affected thread in:

%USERPROFILE%\.codex\state_5.sqlite

Using:

SELECT id, archived, archived_at, rollout_path
FROM threads
WHERE id = ?;

The affected thread had:

archived     = 0
archived_at  = NULL

rollout_path =
\\?\C:\Users\<username>\.codex\sessions\2026\08\18\rollout-....jsonl

The important part appears to be the Windows verbatim-path prefix:

\\?\

The actual rollout file exists at the equivalent normal Windows path:

C:\Users\<username>\.codex\sessions\2026\08\18\rollout-....jsonl

Session integrity

I also checked whether the rollout JSONL itself was corrupted.

The affected session contained 660 JSONL lines.

When read explicitly as UTF-8, every line successfully parsed as JSON:

Total lines: 660
Parse failures: 0

The rollout file was also:

IsReadOnly: False

So the failure does not appear to be caused by malformed JSONL data or file permissions.

Workaround

I found a reproducible workaround.

First, I fully quit Codex Desktop and backed up:

%USERPROFILE%\.codex\state_5.sqlite

Then I changed only the affected thread's rollout_path from:

\\?\C:\Users\<username>\.codex\sessions\...\rollout-....jsonl

to:

C:\Users\<username>\.codex\sessions\...\rollout-....jsonl

I did not manually modify:

archived
archived_at

and I did not manually move the rollout file.

After changing only rollout_path, I restarted Codex Desktop and archived the thread directly from the sidebar without opening the conversation first.

The archive succeeded immediately.

The rollout file was then moved normally from:

.codex\sessions

to:

.codex\archived_sessions

I repeated the same procedure on a second affected thread and it also succeeded immediately.

Before / after

Before:

rollout_path = '\\\\?\\C:\\Users\\<username>\\.codex\\sessions\\...'
archived     = 0
archived_at  = None

After manually normalizing only the path:

rollout_path = 'C:\\Users\\<username>\\.codex\\sessions\\...'
archived     = 0
archived_at  = None

Then, after using Codex's normal Archive action, the thread archived successfully.

Expected behavior

Codex should treat:

\\?\C:\Users\...\file.jsonl

and:

C:\Users\...\file.jsonl

as referring to the same Windows filesystem path, or otherwise consistently normalize rollout_path before performing archive operations.

Archiving an existing completed thread should succeed regardless of whether its stored rollout path uses the Windows \\?\ verbatim-path prefix.

Suspected cause

This looks like a Windows path-normalization issue in the thread/archive flow.

A thread's rollout_path can apparently be stored in state_5.sqlite using the Windows verbatim-path form:

\\?\C:\...

while the archive logic appears to expect or compare against the normal form:

C:\...

Because changing only this field makes the archive operation succeed consistently, rollout_path normalization appears to be directly involved in the failure.

The issue may be related to opening/resuming an existing thread, although I have not yet isolated the exact operation that causes rollout_path to acquire the \\?\ prefix.

Reproduction

A possible reproduction path is:

  1. Use Codex Desktop on Windows.
  2. Create or reopen an existing thread.
  3. Finish the task normally.
  4. Inspect threads.rollout_path in .codex/state_5.sqlite.
  5. If the stored path is in the form:
\\?\C:\Users\...
  1. Attempt to archive the thread from the sidebar.
  2. Codex displays:
Unable to archive conversation
  1. Fully quit Codex.
  2. Normalize only that database value to:
C:\Users\...
  1. Restart Codex.
  2. Archive the same thread from the sidebar.
  3. Archive succeeds.

Additional notes

I initially investigated the Codex Desktop logs, but clicking Archive did not produce a useful archive-related error in the log file I was monitoring.

The problem was isolated by inspecting the session file and state_5.sqlite.

Since two independent affected threads were both fixed by changing only the \\?\ path representation, this appears to be a deterministic Codex Desktop Windows bug rather than corruption of a specific conversation.

I can provide additional database field values or sanitized diagnostics if needed.

What steps can reproduce the bug?

any session can reproduce this bug

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 9 days ago

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

  • #39321
  • #39239
  • #39209
  • #39150

Powered by Codex Action

ActiveSky · 8 days ago

Independent reproduction on Windows Codex Desktop 26.814.5517.0:

  • The failure is selective: some local tasks archive successfully, while some older/resumed tasks fail from the normal Archive action.
  • The UI shows Failed to archive conversation. The local backend returns:

failed to archive session: thread-store internal error: 系统找不到指定的文件。 (os error 2)

  • For the failing tasks, the rollout JSONL exists and is readable, but the task remains unarchived and no file appears in .codex\archived_sessions.
  • The failing rows use a rollout_path with the Windows extended-length prefix \\?\C:\..., while successful rows use the ordinary C:\... form.

I made a backup and changed only the affected database rollout_path value from the extended-length form to the equivalent ordinary Windows path; I did not change archived/archived_at or move the rollout file manually. When I invoked the normal Archive action immediately afterward, the archive succeeded: the rollout moved to .codex\archived_sessions and the thread became archived. If the app is left running before archiving, its path synchronization can write the \\?\ form back.

One affected legacy session also records the older CLI version 0.147.0 and history_mode=paginated; this may be an additional compatibility factor, but the deterministic trigger observed here is the stored path representation.

This confirms that the source file is not actually missing and that the archive destination is usable. Codex should normalize or consistently handle both path forms throughout the thread archive and path-synchronization flows. A regression test should cover existing local tasks whose persisted rollout_path starts with \\?\.

M-T-D-N · 7 days ago

This appears to be the same underlying defect as the earlier report #39209. The independent audit evidence previously posted here has been moved to this comment on #39209.

AI disclosure

At the user's direction, this comment transparently records that the user authorized the change and completed the GitHub authentication step, while the drafting and GitHub posting were performed by an AI agent (OpenAI Codex) on the user's behalf.

chur-chess · 4 days ago

Reproducible trigger isolated: VS Code thread/resume
I ran an A/B test on the same idle thread (source = vscode, with no active turn).
Environment: Windows 11 Pro 25H2, x64, build 26200.9168; Codex Desktop package 26.818.5229.0; Desktop app-server client 26.818.41509; VS Code Codex client version reported in the log 26.818.41705; bundled Codex CLI 0.149.0-alpha.4.1.
Control case: I kept VS Code and the Codex extension running, but did not open the target thread in VS Code. Archiving that thread from Codex Desktop succeeded.
Trigger case: I restored the same thread to the unarchived state, opened it in VS Code Codex, and confirmed that the VS Code log recorded a thread/resume request for that thread. I then closed or hid the Codex panel while leaving VS Code and its extension process running. Attempting to archive the same thread from Codex Desktop failed with “Unable to archive conversation.” Other threads that had not been resumed in VS Code could still be archived successfully at the same time.
After the failed archive attempt, the thread remained in state_5.sqlite with:
archived = false
archived_at = null
source = vscode
rollout_path = \?\C:...\rollout-....jsonl
The corresponding rollout JSONL file existed at the equivalent normal Windows path.
This A/B result indicates that merely running the VS Code Codex extension is not sufficient to cause the failure. The failure appears after the target thread is resumed through VS Code thread/resume, together with the thread’s rollout_path being stored in the \?\ extended-path form. This provides a reproducible cross-client trigger for the state described in this issue.