Codex Desktop Windows: existing local session becomes unresolvable ("thread not found" / os error 2)
What version of the Codex App are you using (From “About Codex” dialog)?
26.814.41407
What subscription do you have?
plus
What platform is your computer?
OS: Windows 11, build 10.0.26100
What issue are you seeing?
I can reproduce what appears to be a closely related issue on Codex Desktop for Windows, but in my case the failure affects both thread continuation and archiving.
Environment
- Codex Desktop:
26.814.41407 - Bundled CLI/app-server recorded in the session:
0.148.0-alpha.9 - OS: Windows 11, build
10.0.26100 - Host:
local
Additional behavior
The affected thread remains visible in the Codex sidebar and its existing conversation can still be opened and read.
However, sending any new message fails with:
thread not found: <thread-id>
Attempting to archive the same thread also fails.
Calling the archive operation directly with the correct thread ID and hostId: local produces:
failed to archive session:
thread-store internal error:
failed to archive thread:
The system cannot find the file specified. (os error 2)
Local investigation
The underlying rollout JSONL file still exists under:
C:\Users\<username>\.codex\sessions\2026\08\18\
rollout-2026-08-18T11-20-18-<thread-id>.jsonl
I verified that:
- The file exists and is readable.
- The file is approximately 3.26 MB.
session_meta.session_idmatches the affected thread ID.- The metadata timestamp matches the rollout filename.
- The thread is still present in the local thread catalog.
- Its host is
local. - Its status is
notLoaded. - The existing conversation can still be read through the thread-reading interface.
So in this case the rollout/session data itself does not appear to be missing or corrupted.
Workaround
I backed up the JSONL file, verified the backup with SHA-256, and manually moved the original rollout file from the dated sessions directory into:
C:\Users\<username>\.codex\archived_sessions
After doing this, the broken thread disappeared from the normal thread list.
Possible relation to this issue
This may be related to the Windows path normalization problem described here, although I have not confirmed whether the affected catalog entry specifically contains a \\?\-prefixed path.
One additional symptom in my case is that the thread-store cannot resolve the thread for continuation/resume, not only for archive, despite the rollout file still being present and readable.
It may be useful for the archive/resume path resolution logic to reconcile the stored catalog path against existing rollout files when the referenced path cannot be resolved.
I can provide the affected thread ID, screenshots, logs, and additional diagnostics privately if useful.
Best regards,
Huaiyu Yin
What steps can reproduce the bug?
I have not yet identified the exact action that initially causes the thread catalog/session path to become inconsistent. However, once the affected thread enters this state, the failure is consistently reproducible.
Steps to reproduce the observed failure
- Open Codex Desktop on Windows.
- Select the affected existing thread from the sidebar.
- The existing conversation content is still displayed normally and can be read.
- Send any new message in the thread.
- Codex fails with:
thread not found: <thread-id>
- Try to archive the same thread from the Codex Desktop UI.
- The archive operation also fails with a
thread not founderror.
- Restart Codex Desktop and repeat steps 2–7.
The problem persists after restart.
- Calling the archive operation directly using the same thread ID with
hostId: localfails with:
What is the expected behavior?
_No response_
Additional information
_No response_
9 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional reproduction (Windows local session):
failed to archive session: thread-store internal error: failed to archive thread: The system cannot find the file specified. (os error 2)The existing transcript remains readable. A local diagnostic check shows that unarchive/reindexing rewrites the catalog entry using an extended-length Windows path form; normalizing that path form makes the archive operation succeed. This suggests a Windows path-normalization or catalog-path reconciliation regression specifically after unarchiving a local session.
I can reproduce this on Codex Desktop for Windows.
Environment:
Affected thread IDs:
Both threads remain visible in the Recent sidebar, but cannot be resumed or archived.
The UI shows:
failed to resolve rollout path
\\?\C:\Users\<username>\.codex\sessions\2026\08\19\
rollout-2026-08-19T09-59-34-01a017be-c82f-7d42-87ee-172db8679aa6.jsonl:
file does not exist
Archiving also fails with:
failed to archive session:
thread-store internal error:
failed to archive thread:
The system cannot find the file specified. (os error 2)
The rollout JSONL is already missing, but the local thread catalog/sidebar metadata continues to reference it after restarting Codex. This leaves an undeletable, unarchivable orphan entry in the UI.
Expected behavior:
Additional independent reproduction on Codex Desktop for Windows (2026-08-20).
Environment:
26.814.5517.00.148.0-alpha.15Observed behavior:
thread not found: <thread-id>.-32603:failed to archive session: thread-store internal error: failed to archive thread: Den angivne fil blev ikke fundet. (os error 2)session_meta.session_idmatched the thread.Notable recovery observation:
11-23-43) whilesession_meta.timestampwas09:23:43Z.09-23-43), the nativethread/archiveoperation succeeded.archived=1.\\?\prefix.No conversation content, user paths, or raw logs are included.
Additional reproduction on Codex Desktop for Windows.
Environment
26.818.2441.0(x64)0.148.0-alpha.15Review FX EA test handoff01a016c0-d177-7a32-b138-15192bfecfedImportant sequence of events
``
text
``thread not found: 01a016c0-d177-7a32-b138-15192bfecfed
``
text
``failed to archive session: thread-store internal error: failed to archive thread: The system cannot find the file specified. (os error 2)
Local evidence before deletion
The rollout file still existed and was readable at the time the native archive operation failed. Its filename timestamp was:
The first
session_metarecord contained:The filename was therefore exactly one hour ahead of the UTC metadata timestamp, matching British Summer Time. This appears consistent with the UTC/local-time filename mismatch reported in #39575, but here the observable failure also progressed to
thread not foundwhen a new prompt was sent.The session file was manually deleted only after all of the above failures while trying to remove the unusable sidebar entry. That deletion was a later troubleshooting action and did not cause the original archive or continuation failures.
Expected behavior
A visible completed task should archive normally. If its rollout path cannot be resolved, Codex should reconcile the thread ID against the existing rollout file rather than leaving a sidebar task that cannot be archived or continued.
A controlled four-thread comparison provides additional evidence that this failure is specific to cold/not-loaded thread resume, rather than missing conversation data or deletion of the originating schedule.
Environment
26.818.2441.0(Windows x64)0.147.0-alpha.6.6subagentthreads created within six seconds for a scheduled model-comparison test.Results
| Variant | Thread ID | Current status | New prompt result |
| --- | --- | --- | --- |
| GPT-5.5 light |
01a0017c-0500-79e2-86cd-ca460f69b1a8|notLoaded|thread not found|| Sol light |
01a0017b-fde4-7cd2-959c-ee5a08d5d8a9|idle| Succeeds || Terra light |
01a0017b-f6d0-7ea3-b81a-050ec4ad9962|idle| Succeeds || Luna light |
01a0017b-ef92-71d3-8adb-8f67e2390fd4|notLoaded|thread not found|Exact errors for the two failing tasks:
The thread-reading interface can still read the complete original turns from both failing threads, confirming that the rollout contents remain available. The failure occurs when trying to continue/resume them.
Cold versus refreshed state
The two working sessions (Sol and Terra) successfully accepted a
testturn on 20 August. Their rollout files grew from the original run and their states are nowidle.The two failing sessions (GPT-5.5 and Luna) contain only their original short runs from 14 August and remain
notLoaded.This makes the key boundary reproducible within an otherwise matched four-thread group:
notLoadedthread -> continuation returnsthread not found.BST/UTC filename mismatch across all four
Each rollout filename uses local BST while its
session_meta.timestampuses UTC, with an exact one-hour difference. Examples:All four database
rollout_pathvalues point to existing files. The paths also use the Windows verbatim\\?\C:\...form.This appears consistent with #39575: a loaded thread may retain/use its resolved actual path, while a cold
notLoadedresume may reconstruct or normalize the filename/path and fail because of the UTC/local-time mismatch (possibly compounded by the\\?\prefix).Deleting the schedule definitions did not delete these rollout files and does not explain why two sibling tasks work while two fail.
Separate title-encoding symptom
All four sidebar/read-interface titles render an intended em dash as mojibake:
This appears to be a separate title-generation or decoding defect; it affects both working and failing threads.
Expected behavior
A readable
notLoadedthread with an existing rollout file should resume exactly as an already-loaded sibling thread does. Schedule deletion should not leave retained run tasks that are readable but cannot be continued or archived. If completed automation/subagent runs are intentionally retained, they should remain manageable through the normal archive operation.Additional Windows reproduction with a confirmed local root-cause/workaround. This affects more than archive→unarchive→archive: some pre-existing local tasks can fail to archive even without a prior unarchive, and an affected task can also become temporarily unable to continue.
Observed behavior:
thread not found: <thread-id>Local state evidence on one affected thread:
state_5.sqlite.threads.archived = 0archived_at = NULLsessionsarchived_sessionsPRAGMA integrity_checkreturnsokthreads.rollout_pathused the Windows verbatim/extended form:\\?\C:\Users\<user>\.codex\sessions\...\rollout-<thread-id>.jsonlC:\Users\<user>\.codex\sessions\...Controlled repair:
rollout_path, normalizing the verbatim\\?\C:\...form to the ordinaryC:\...form.archived/archived_atand did not move/delete the rollout JSONL.thread/archivepath.Result:
archive → unarchive → archiveround trip.archive → unarchive → archive.thread not foundoccurred in the post-fix round trip.This suggests the Windows verbatim-path representation is not only related to archive
os error 2, but can also contribute to a thread becoming unresolvable for continuation in Desktop/app-server state. The failure is not limited to threads that were previously archived/unarchived; older/pre-existing tasks can already carry the problematic path form.This appears closely related to #39150, #39209 and #39239. A durable fix likely needs consistent Windows path normalization/canonical identity across list/resume persistence and archive resolution, rather than relying on users to rewrite
state_5.sqlitemanually.No conversation contents, raw state databases, usernames, local project names, or real thread IDs are included here.
this is happening all the time to me
Independent, non-destructive recovery observation for one
thread not foundcase. I am not claiming that this has the same root cause as everyos error 2/ rollout-path failure reported here.Preconditions observed
thread not found.no archived rollout found, so unarchiving was not the recovery action.Recovery probe that succeeded
From a separate healthy Codex task, I asked Codex to use its task-management tools against the exact affected task ID on host
local:read_threadfor the affected ID.send_message_to_threadwith this minimal prompt:``
text
``Connection recovery test: do not read files, call tools, or continue old work. Only reply: "Thread recovered; conversation is working."
wait_threadsand require a completed turn with no error and the expected reply.The probe turn completed successfully. More importantly, the task subsequently completed a normal substantive user turn, confirming that continuation really was restored. No session files or SQLite rows were changed.
Important correction and limits
notLoadedby itself is not a reliable failure/recovery criterion: after successful use, the task can later be unloaded and shownotLoadedagain. The meaningful checks are whether a new turn completes without error and whether subsequent normal conversation works.This is a reproducible, low-risk probe only for the case where
read_threadcan still read the task. If reading or cross-task sending fails, the rollout is missing, oros error 2persists, stop; that is likely a different path/catalog failure and this observation should not be treated as a fix for it.A user-facing prompt for another healthy Codex task is: