Repository navigation
Windows: sidebar shows 'No chats' in project folders because cloud sync rewrites threads.cwd with \\?\ extended-length prefix #27243
Description
What version of the Codex App are you using?
Latest as of 2026-06-09 (auto-updated; ~/.codex/version.json reports latest_version: 0.138.0)
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 11 Pro 10.0.26200
What issue are you seeing?
Most project folders in the Codex Desktop sidebar show "No chats" even though the chats still exist. This looks like the same symptom as #20741 and #23193, and I believe I found the root cause on Windows, with a reproducible local diagnosis.
Root cause: the sidebar groups chats into project folders by exact string match on threads.cwd in ~/.codex/state_5.sqlite. For 334 of my 677 threads, cwd is stored with the Windows extended-length path prefix:
\\?\C:\Users\<user>\Projects\YouTube <- stored in threads.cwd
C:\Users\<user>\Projects\YouTube <- project root the sidebar groups by
The strings never match, so the folder renders "No chats" while the threads are intact (rollout JSONL files exist under ~/.codex/sessions/... and are listed in ~/.codex/session_index.jsonl). Notably, the session_meta / turn_context records inside the rollout files contain the plain cwd without the prefix — only the SQLite threads.cwd column has the prefixed form.
The prefix is re-introduced by cloud sync at every app launch. I verified this:
- With the app closed, I stripped the
\\?\prefix from allthreads.cwdvalues (backed up DB first). Result: 0 prefixed rows, folders would match. - On the next app launch, exactly the ~100 most recent threads with
source = 'vscode'(many withthread_source = 'user') got theircwdrewritten back to the\\?\-prefixed form, withupdated_atequal to the launch time. No local file in~/.codexcontains the prefixed paths for those threads, so the values must come from server-side thread metadata recorded at session creation time. - Stripping the prefix again after the startup sync completes makes all folders show their chats immediately — until the next app restart re-breaks the ~100 recent threads.
This is likely the same path-normalization family of bugs as #24697 and #20517 (rollout path compared with and without the \\?\ prefix), but here it affects sidebar folder grouping and makes chats appear lost to users.
What steps can reproduce the bug?
- On Windows, use Codex Desktop with several project folders that have chat history (threads created by some earlier CLI/app versions recorded the canonicalized
\\?\cwd). - Open the sidebar: affected folders show "No chats".
- Inspect
~/.codex/state_5.sqlite:select cwd from threads where cwd like '\\?\%'returns many rows whose plain-path equivalents are exactly the project roots shown in the sidebar. - Strip the prefix (
update threads set cwd = substr(cwd, 5) where cwd like '\\?\%') → chats reappear in their folders. - Restart the app → the most recent ~100 user threads are rewritten back to the prefixed form by startup sync and disappear from folders again.
What is the expected behavior?
- Folder grouping should normalize Windows extended-length paths (
\\?\C:\...≡C:\...) before matching, and/or - Sync should not overwrite a locally-normalized
cwdwith a stale prefixed variant.
Chats should never appear lost because of path canonicalization differences.
Additional information
Workaround for affected users (after the app has started and synced):
update threads set cwd = substr(cwd, 5) where cwd like '\\?\%';on ~/.codex/state_5.sqlite — chats reappear instantly, but it must be re-run after every app restart.
Activity
github-actions commentedon Jun 9, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
cwduses the\\?\path prefix #26411Powered by Codex Action
takush74 commentedon Jun 10, 2026
Additional minimal data point on Windows 26.608.
Environment:
26.608.1221726.608.1337.0codex-cli 0.138.0-alpha.7Observed behavior:
X:\<project>/ saved workspace roots, while thread rows used Windows extended/UNC-style paths such as\\?\UNC\<server>\<share>\<project>.This looks related to the same sidebar/project grouping issue, with a possible in-memory/sidebar refresh bug after a restored thread is opened. No raw local paths or private project names included here.
Elvis-Christian commentedon Jun 11, 2026
Confirming that this issue also affects my Codex Desktop installation on Windows, specifically all projects backed by mapped network/SSHFS drives.
Environment:
26.608.1337.0(latest Microsoft Store version available to me on June 11, 2026)C:\Users\...\Downloadsdisplays its chats normallyK:\,Z:\,W:\, andY:\display no chats when expandedThe missing chats are not lost:
state_5.sqlitepassesPRAGMA integrity_checkthreadstableThe path mismatch is clear in the local state. The Desktop sidebar stores project roots using mapped-drive paths such as
K:\andZ:\, while affectedthreads.cwdvalues use canonical extended UNC paths such as:K:\vs\\?\UNC\sshfs.r\...\opt\taktos\Z:\vs\\?\UNC\sshfs\...\In one affected project, 25 existing threads were associated with the canonical UNC path while the sidebar project root was
K:\. Manually changingthreads.cwdto the mapped-drive path made the association work temporarily, but the running Desktop app rewrote some values back to canonical UNC paths within seconds.This makes continuity very difficult for users working with remote repositories, NAS shares, SSHFS mounts, mapped drives, junctions, or other equivalent Windows path forms. The project-thread lookup should compare normalized path identities rather than literal path strings.
wbuchser commentedon Jun 11, 2026
Additional Windows data point:
Environment:
Observed on two machines after the 26.608 update:
C:\...paths appear normal.R:\..., backed by a UNC path.substdrive path, e.g.B:\..., backed by a local absolute path.Observed behavior:
This looks like the same path-normalization/sidebar grouping bug described here, with the extra note that it affects local
substdrive aliases as well as mapped network-drive/UNC paths.onodanaoto-main commentedon Jul 12, 2026
I submitted the issue through the in-app feedback flow.
Feedback ID:
019f53e9-3c40-7521-93d8-1af755e058f5
Please associate this feedback with my support request and escalate it to the Codex Desktop engineering team. The report includes the recurring sidebar disappearance, Remote SSH details, and the symbolic-link versus physical cwd mismatch.
VirgilMing commentedon Sep 10, 2026
Adding a current cross-platform SSH reproduction that appears to hit the same exact-string project/thread matching bug, but with the simplest Windows path-equivalence case:
/vs\.Environment:
26.901.512310.154.0initialize, andthread/listall succeed.Observed path representations for the same remote project:
The remote app-server has 65 unarchived threads; 56 belong to this project. The Linux Desktop's
local_thread_cataloghas already synchronized all 65 rows, including all 56 project threads, and its sync state reports the initial build complete. Nevertheless the project sidebar showsNo chats.A read-only comparison against the Desktop catalog isolates the mismatch:
The remote app-server itself is not the failing layer: issuing
thread/listwith either the forward-slash or backslash spelling of the Windows cwd returns the same 56 project threads.I also inspected the currently running Desktop bundle. The remote-project sidebar path feeds the saved project path into
cwdValues; the local thread catalog query'sexact_cwdbranch ultimately performs an exact SQL string match of the form:The imported catalog row preserves the remote thread's raw
cwd, so the two equivalent Windows spellings never compare equal. The prefix query path has the same representation problem.Additional control observations:
This is related to #30808 (SSH remote project path identity), but does not require symlinks, realpath differences, mapped drives, UNC paths, or the
\\?\prefix. A separator-only difference is sufficient.One implementation detail seems important for the fix: because the Desktop client here runs on Linux while the remote filesystem is Windows, path normalization cannot safely depend only on the client's native path semantics (for example, blindly using the local platform's
path.normalize). Project/thread identity needs to use the remote host's path semantics, or a normalized/canonical project identity supplied by the remote app-server.At minimum, for Windows SSH hosts,
C:/foo/barandC:\foo\barshould compare as the same project path beforeexact_cwd/ prefix filtering is applied.