Repository navigation
Windows Desktop ignores redirected Documents Known Folder for projectless workspaces #33515
Description
Summary
On a Windows installation where Documents is redirected by OneDrive Known Folder Move, Codex Desktop uses a path that does not even exist to store projectless threads, instead of resolving the effective Windows Known Folder.
Evidence
The Documents Known Folder registered by Windows resolves to:
C:\Users\<windows-user>\OneDrive\Documentos
That directory exists.
These paths do not exist on the system:
C:\Users\<windows-user>\Documents
C:\Users\<windows-user>\Documents\Codex
Even so, projectless threads were previously created under:
C:\Users\<windows-user>\Documents\Codex\<date>\<thread-slug>
I directly confirmed that this is hardcoded in the app: Codex textually constructs %USERPROFILE%\Documents\Codex instead of querying the effective Windows Known Folder (for example, via SHGetKnownFolderPath(FOLDERID_Documents) or an equivalent). I am not attaching the inspected code/binary snippet here; I can add further technical detail if useful.
Worth noting that on installations without OneDrive Known Folder Move active, the plain path C:\Users\<user>\Documents normally exists by Windows default — which is why this problem is only visible for users with that redirection active, as in my case.
There are two related but distinct problems:
- The base directory for projectless threads is not configurable.
- The Windows fallback ignores redirection, localization, and OneDrive Known Folder Move.
Expected behavior:
- For the Windows agent, correctly use the Known Folder when "Documents" is actually needed.
- For the WSL agent, allow choosing a native path, such as
/home/<wsl-user>/workspace/codex. - Do not silently create a parallel Documents tree that does not match the real Known Folder.
- Do not automatically move existing threads.
Related issues found before opening this one:
- App silently creates empty
~/Documents/Codexfolder on every launch #20880 — similar behavior reported on macOS, with a comment confirming the same pattern on Windows. - Codex Desktop should avoid OneDrive-backed Documents as the default Windows project location #22532 — reports that the "Start from scratch" flow uses Electron's
app.getPath("documents"), which correctly resolves to OneDrive; that is a different UX problem from this one, which is about the path not existing at all. - Feature Request: [App] Make the "Chats" project directory configurable #19909 / Codex App: add default parent folder setting for Start from scratch projects #19913 — feature requests to make the directory configurable.
I don't believe this issue is a duplicate of the ones above, since none of them specifically documents the case where the path used does not exist while the redirected Known Folder does exist and is not used.
Environment:
- Codex Desktop/MSIX: OpenAI.Codex 26.707.9981.0
- Windows 11, build 10.0.26200.8875, x64
Activity
ZephyrFBD commentedon Oct 6, 2026
Confirmed on Windows Codex desktop package 26.930.7945.0 on 2026-10-06. The redirected-Documents bug in this issue still occurs when Documents is on a separate local drive, without OneDrive.
Both the Windows Known Folder result and the registry configuration point to:
Verification commands:
Nevertheless, a projectless chat received a working directory under:
The C: directory was a real directory, not a junction or symlink to the D: Known Folder. Generated files actually occupied C:, and were absent from the Documents location shown by Windows Explorer.
Read-only inspection of the installed desktop bundle found that the default projectless workspace root uses the equivalent of:
The projectless creation path supplies the OS home directory. With no explicit workspace override, this path composition does not consult the redirected Windows Documents Known Folder.
The current app does support a persistent override:
That key was unset on the affected host before remediation. An explicit override is a workaround; it does not fix the incorrect default for other Windows users. Configuration persistence was verified, but a fresh desktop chat after a restart was not created as part of this report.
Reproduction:
Expected: the unset/default workspace location resolves the effective Windows Documents Known Folder and uses its
Codexsubdirectory.Actual: a parallel
Documents\Codextree is created under the C: user-profile directory, consuming the system drive unexpectedly.Please resolve the default via the Windows Known Folder API (or an equivalent, such as Electron's documents-path resolver), while retaining the explicit override. Usernames, chat identifiers, session logs, and account data are omitted from this report.