Repository navigation
Codex Desktop conversations become empty and resume fails with stale Windows path #24178
Description
Summary
On Windows, many Codex Desktop conversations gradually become unavailable or show as empty / "No conversation" in the UI, even though the local SQLite database and rollout JSONL session files still exist.
Reinstalling Codex Desktop did not fix the issue.
A related resume failure shows that the app treats two equivalent Windows paths as different paths:
cannot resume running thread 019e49af-8706-7773-b282-4be83c769e19 with stale path:
requested `\\?\C:\Users\<USER>\.codex\sessions\2026\05\21\rollout-2026-05-21T16-38-23-019e49af-8706-7773-b282-4be83c769e19.jsonl`,
active `C:\Users\<USER>\.codex\sessions\2026\05\21\rollout-2026-05-21T16-38-23-019e49af-8706-7773-b282-4be83c769e19.jsonl`
These two paths refer to the same file on Windows, but Codex appears to compare them as raw strings and rejects the resume as stale.
Symptoms
- Many old project conversations appear as empty / "No conversation" in Codex Desktop.
- Some project folders previously had visible conversations, but over time the conversations disappeared from the UI.
- Some conversations from around one month ago are no longer accessible from the UI.
- Reinstalling Codex Desktop did not restore the missing/empty conversations.
- The underlying rollout files still exist on disk.
state_5.sqlitestill contains thread records, butsession_index.jsonlappears incomplete/out of sync.
Environment
- OS: Windows 11 Pro
- OS version: 10.0.26200
- Build: 26200
- Architecture: x64
- Filesystem: NTFS
- Codex App package:
OpenAI.Codex_26.519.3891.0_x64__2p2nqsd0c76g0 - Codex executable version shown by Windows:
0.133.0.0 - CPU: AMD Ryzen 9 8945HX
- RAM: 32 GB
- GPU: NVIDIA GeForce RTX 5070 Ti Laptop GPU + AMD Radeon 610M
- Reinstall attempted: yes, issue persisted after reinstall
Local diagnostic findings
The following checks were performed without modifying the Codex data directory.
Thread database
state_5.sqlite still contains thread records:
threads_total: 277
active_threads: 269
archived_threads: 8
Most thread cwd values use the extended Windows path prefix:
cwd starts with \\?\ : 273
rollout_path starts with \\?\ : 3
Path prefix distribution:
cwd_prefix rollout_prefix count
\\?\ C:\ 270
D:\ C:\ 3
\\?\ \\?\ 3
C:\ C:\ 1
Rollout files
Rollout files still exist:
sessions rollout files: 270
archived rollout files: 10
session_index.jsonl lines: 175
missing rollout files referenced by state_5.sqlite: 0
This suggests the data files are present, but the UI/index layer is not showing or loading many of them correctly.
Example affected thread
For the thread that failed to resume:
thread id: 019e49af-8706-7773-b282-4be83c769e19
cwd:
\\?\C:\Users\<USER>\Documents\.Projects\<PROJECT>
rollout_path:
C:\Users\<USER>\.codex\sessions\2026\05\21\rollout-2026-05-21T16-38-23-019e49af-8706-7773-b282-4be83c769e19.jsonl
A later thread recording the failure has:
cwd:
\\?\C:\Users\<USER>\Documents\Codex\2026-05-21\cannot-resume-running-thread-019e49af-8706
rollout_path:
\\?\C:\Users\<USER>\.codex\sessions\2026\05\21\rollout-2026-05-21T17-57-40-019e49f8-2759-7fa0-909b-4d87a3339733.jsonl
So the local database contains a mixture of normal C:\... paths and extended \\?\C:\... paths.
Expected behavior
- Codex Desktop should normalize equivalent Windows paths before comparing them.
C:\Users\<USER>\...and\\?\C:\Users\<USER>\...should be treated as the same path.- Conversations should not show as empty if the corresponding rollout JSONL file exists and is referenced by
state_5.sqlite. - Reinstalling the app should not leave the history UI in a broken state if the local session data remains intact.
- If
session_index.jsonlis stale or incomplete, Codex should be able to rebuild it fromstate_5.sqliteand existing rollout files, or expose a repair command.
Actual behavior
- Resume can fail with
stale patheven when requested and active paths point to the same file. - Many conversations appear empty or disappear from UI.
state_5.sqliteand rollout files still exist, butsession_index.jsonlappears out of sync.- Reinstalling Codex Desktop does not resolve the issue.
Privacy note about logs
I am not attaching raw logs_2.sqlite publicly because it appears to contain sensitive data.
A quick local scan found occurrences of sensitive-looking strings such as:
NVIDIA_API_KEYS
api_key
API_KEY
Bearer
user.email
auth.json
phone-number-like strings
private URLs
However, diagnostic terms are also present in the logs:
cannot resume running thread
stale path
session_index
state_5.sqlite
No conversation / empty conversation UI text
I can provide a redacted diagnostic excerpt if maintainers specify what fields are safe and useful.
Related issue
This may be related to the Windows/path identity class of issues, especially:
That issue describes thread/resume rejecting equivalent rollout paths as stale when the same file is represented by different path spellings.
Requested help
Could Codex Desktop:
- Normalize Windows paths before stale-session comparison?
- Add a safe repair/reindex command for
session_index.jsonlbased onstate_5.sqliteand existing rollout files? - Recover/show conversations when rollout files exist but the UI displays them as empty?
- Document which local files should be backed up before reinstalling?
- Provide guidance for safely sharing logs without leaking credentials or personal data?
Activity
github-actions commentedon May 23, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
jshaofa-ui commentedon May 23, 2026
Solution: Codex #24178 — Conversations Empty + Stale Windows Path
Issue: #24178
Labels: bug, windows-os, app, session
Competition: 1 comment (low competition)
Estimated Value: $1,000–$3,000
Created: 2026-05-23
Problem Summary
On Windows, Codex Desktop conversations become empty/unavailable over time. The underlying SQLite database and rollout JSONL files still exist, but the UI shows "No conversation." A related resume failure shows that Codex treats two equivalent Windows paths as different:
These two paths refer to the same file on Windows, but Codex compares them as raw strings.
Environment: Windows 11 Pro 26200, Codex 0.133.0.0, NTFS filesystem
Root Cause Analysis
Root Cause 1: Windows Path Normalization (Primary)
Windows supports multiple equivalent path formats:
C:\Users\foo\.codex\...\\?\C:\Users\foo\.codex\...\\server\share\...C:\Users\FOO\APPD~1\...The
\\?\prefix is automatically added by:fsmodule when using certain operationsThe bug: Codex stores paths in one format (e.g.,
C:\Users\...) but later resolves them in another format (e.g.,\\?\C:\Users\...). The string comparison fails, causing:Root Cause 2: Session Index Desync (Secondary)
The
session_index.jsonlfile appears to be incomplete or out of sync with the SQLite database. This could be caused by:Proposed Fix
Fix 1: Path Normalization Utility (Primary)
HeyDachui commentedon May 28, 2026
Additional Windows reproduction from another local Codex Desktop install.
I am seeing the same stale-path class of failure, but with one extra data point: offline normalization of the local state database does not persist after restarting Codex.
Symptom
Codex repeatedly fails to resume a running thread with a stale path error where the requested and active paths differ only by the Windows extended-path prefix:
These point to the same file on Windows, but the resume guard appears to treat them as different paths.
Scope observed
This is not limited to one old or very large conversation. I have seen it affect:
task_completerunningthreadsLocal repair attempted
With Codex fully exited, I performed two offline repair passes:
state_5.sqlitethreads.rollout_pathandthreads.cwdImmediately after the offline repair, the database looked clean:
{ "after": { "rollout_path_extended": 0, "cwd_extended": 0, "integrity_check": "ok" } }However, after restarting Codex, extended-path prefixes were written back into local state again:
Interpretation
This suggests the root cause is not only stale local user data. Codex itself appears to write some Windows paths back using the
\\?\form while resume requests may use the regularC:\...form. If the resume comparison happens before Windows path normalization, equivalent paths can be rejected as stale.Suggested product-side fix
It would help if Codex normalized path identity before comparing:
threads.rollout_paththreads.cwdAt minimum, if two paths differ only by
\\?\vs regular drive-letter form and resolve to the same file, resume should not be blocked as stale.I am not attaching raw logs or session files publicly because they may contain private local paths or credentials. I can provide redacted diagnostics if maintainers specify what would be useful.
fix(windows): Codex attached once and never retried - Claude Code ret…