Skip to content

Windows Desktop ignores redirected Documents Known Folder for projectless workspaces #33515

Open

Description

@gilmarvitor

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:

  1. The base directory for projectless threads is not configurable.
  2. 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:

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

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    windows-osIssues related to Codex on Windows systems
    on Jul 16, 2026
  2. ZephyrFBD commented on Oct 6, 2026

    @ZephyrFBD

    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:

    D:\Users\<user>\Documents
    

    Verification commands:

    [Environment]::GetFolderPath([Environment+SpecialFolder]::MyDocuments)
    (Get-ItemProperty -LiteralPath 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' -Name Personal).Personal

    Nevertheless, a projectless chat received a working directory under:

    C:\Users\<user>\Documents\Codex\2026-10-06\<chat-directory>
    

    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:

    configuredWorkspaceRoot ?? path.join(homeDirectory, "Documents", "Codex")

    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:

    [desktop]
    projectlessWorkspaceRoot = 'D:\Users\<user>\Documents\Codex'

    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:

    1. Redirect the Windows Documents Known Folder to a local D: folder using Windows' normal folder-location settings.
    2. Leave the Codex projectless task folder override unset.
    3. Start a projectless desktop chat and generate a local file.
    4. Compare the assigned working directory and actual files with the Known Folder result above.

    Expected: the unset/default workspace location resolves the effective Windows Documents Known Folder and uses its Codex subdirectory.

    Actual: a parallel Documents\Codex tree 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions