Windows Desktop: all local thread archives fail with thread-store os error 2 although rollout paths exist
What version of the Codex App are you using?
Codex Desktop 26.814.41407 on Windows. The affected threads report bundled CLI versions including 0.148.0-alpha.15.
What subscription do you have?
ChatGPT subscription (exact tier omitted because the failure is entirely local and reproduces through thread/archive).
What platform is your computer?
Windows 11 x64.
What issue are you seeing?
Every local Codex thread now fails to archive from both the Desktop sidebar and the app's set_thread_archived task-management interface.
The app-server returns JSON-RPC error -32603:
failed to archive session: thread-store internal error: failed to archive thread: 系统找不到指定的文件。 (os error 2)
The localized Windows message means "The system cannot find the file specified."
This is not a missing rollout file:
state_5.sqlite.threads.rollout_pathexactly matches the existing rollout JSONL path.- The source JSONL exists, is readable, and has normal file attributes.
- Both
~/.codex/sessionsand~/.codex/archived_sessionsare real directories, not symlinks or junctions. - The archive directory exists and the user has full control.
- There is no same-name destination file.
- After each failure,
archived=0,archived_at IS NULL, and the rollout remains insessions. - Restarting Desktop and confirming all Codex processes exited does not help.
- Retrying after the target thread listener was torn down still returns the same
os error 2. - The failure reproduces across multiple unrelated, valid threads rather than one corrupt conversation.
The Desktop log sequence is consistently:
Archive requested ... source=recent_tasks_menu
response_routed ... errorCode=-32603 ... method=thread/archive
Request failed ... "failed to archive session: thread-store internal error: failed to archive thread: 系统找不到指定的文件。 (os error 2)"
The same error is returned when the archive call comes from source=dynamic_tool, so this is below the renderer/UI layer.
When did this start?
Archiving previously worked on this machine. Desktop logs contain many successful thread/archive responses, including a successful archive on the same Desktop release 26.814.41407 on 2026-08-18. The first confirmed failures appeared on 2026-08-19, after which all tested local threads failed.
This suggests a thread-store state/path-resolution transition rather than a simple account, network, permissions, or app-version issue.
Steps to reproduce
- Start Codex Desktop on Windows.
- Select any ordinary completed local Codex thread.
- Use the sidebar Archive action.
- Observe the red "Failed to archive conversation" toast.
- Call
thread/archivethrough the app task-management interface for the same or another valid local thread. - Observe the same
-32603/os error 2response. - Verify that the rollout still exists at the exact DB-recorded path and the DB row remains unarchived.
Expected behavior
The rollout should move from sessions/YYYY/MM/DD/ to archived_sessions/, and the thread row should be updated atomically to archived=1 with the archived rollout path.
Additional information
Possibly related to #28276, but this report provides a reproducible Windows app-server error and verifies that the DB-recorded source file actually exists.
The current error loses the failing filesystem path. Please preserve the source/destination or failing auxiliary path in the ThreadStoreError::Internal context so Windows os error 2 can be diagnosed precisely.
No rollout files or SQLite rows were manually moved or edited during diagnosis.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional local diagnosis confirms a Windows path-format regression.\n\nObserved correlation:\n- Every confirmed failing thread tested (4/4) had its SQLite threads.rollout_path stored with the Windows extended-length prefix: \\?\\C:\\Users\\<user>\\.codex\\sessions\\...\n- 118 other active rows and all 67 archived rows used ordinary C:\\... paths at the time of inspection.\n- Successfully unarchiving an older thread rewrote its active rollout_path using the \\?\\ prefix; trying to archive that restored thread then failed with the same os error 2.\n\nControlled test on one affected thread:\n1. Created a consistent SQLite online backup and verified both backup and live DB with PRAGMA quick_check = ok.\n2. Changed only that thread's rollout_path from \\?\\C:\\... to C:\\... (same existing JSONL, no other row fields changed).\n3. Called the normal Codex thread/archive API.\n4. Archive succeeded immediately. The source disappeared from sessions, appeared in archived_sessions, and SQLite changed to archived=1 with the ordinary archived path.\n\nControl filesystem tests also succeeded in both directions, including mixed extended/ordinary path forms, so Windows permissions, the volume, and the two directories themselves are not generally blocking rename.\n\nThis makes the \\?\\-prefixed rollout_path handling in Codex's archive pipeline the confirmed trigger on this machine. The unarchive path appears to introduce the problematic representation.
Additional independent reproduction on a newer Windows Desktop build
Environment:
26.814.5517.026200Observed behavior:
archived=0witharchived_atunset after each failure. No database rows or rollout files were edited during diagnosis.The local state also shows the same path-format correlation reported in this issue: affected active rows use a Windows extended-length
\\?\prefix inrollout_path, while successfully archived rows use ordinaryC:\...paths. This is consistent with the duplicate/canonical-path move failure described in the existing root-cause follow-ups.There is a related web persistence symptom: archiving from Codex Web temporarily removes the conversation, but it reappears in the active list after a page refresh.
The separate
muse-spark-1.2 is not supportedmodel-selector error was observed in another context and is not being presented as the cause of this archive failure.This reproduction extends the issue to Desktop
26.814.5517.0and confirms that the failure remains after restart and across unrelated threads. Please consider a regression test covering active local rows with\\?\rollout paths, repeated archive attempts, and persistence across client restart/web refresh.I can reproduce this on Codex Desktop for Windows with a local task.
thread-storeinternal error with Windowsos error 2.No logs, file paths, thread identifiers, account details, or conversation contents are included here.