App silently creates empty `~/Documents/Codex` folder on every launch
Codex should not silently create ~/Documents/Codex on launch.
Every time I open the Codex app, an empty ~/Documents/Codex folder appears in my Documents directory. It stays empty after I close the app, and I have to delete it by hand. This happens whether or not I start a project.
~/Documents is the user's space. macOS-native apps do not write into it without explicit user action, and a well-behaved app from any platform should follow the same convention. Silently creating a folder there on every launch is the kind of behavior users associate with sloppy Windows-era installers, and it is out of place in a modern Mac app.
Please change this. Acceptable options, in order of preference:
- Don't create the folder at all until the user explicitly starts a project that needs disk output. If a project is never started, no folder should ever appear.
- Ask the user once, on first launch or first project, where projects should live, and remember that choice (this also resolves #19913 and #19909).
- Use a hidden application-support location (
~/Library/Application Support/Codex/or~/.codex/) for any internal scaffolding the app needs, and only touch~/Documentswhen the user saves something there.
"Codex needs a working directory" is not a justification for putting it in ~/Documents without asking. If the directory is required, the app can create it under Application Support; ~/Documents is for the user's files, not the app's bookkeeping.
Environment
- Codex App on macOS (Darwin 25.5.0)
- Reproduces on every launch
17 Comments
Same behavior on Windows, codex creates
C:\Users\nos1609\Documents\Codexignoring the system path from Windows registry pointing that the Documents directory is actually at a different location and even a different drive.Looks like same mechanics as used in Linux's xdg-user-dirs have to be implemented on every OS prior to create any custom directory without user's consent.
I can reproduce this as well.
Codex Desktop creates an empty ~/Documents/Codex folder on every launch, even when I do not start or save any project. Deleting the folder does not help because it is recreated the next time the app opens.
Expected behavior:
Codex should not create anything in ~/Documents without explicit user action, or it should let the user choose the default project location.
Environment:
Worth zooming out, because this isn't really a Codex-specific bug, it's a pattern that a lot of Mac users have been quietly annoyed by for years.
There's a long tradition of cross-platform apps with a Windows or web-server center of gravity (Adobe, Zoom, Cisco, lots of Electron-based tools) treating
~/Documents/<BrandName>as a default home whether the app needs a user-visible folder or not. The same culture tends to plant login items and background helpers on install. After six months on a fresh Mac you have a Documents folder full of vendor-branded directories you never asked for, half of them empty, and a login items list that reads like a trade show floor. It's the kind of behavior that made Windows machines feel slow and cluttered by month three, and it's frustrating to see it migrate over to macOS one Electron app at a time.macOS has had a different convention for a long time: internal scaffolding belongs in
~/Library/Application Support/<bundle-id>/, and~/Documentsis the user's space. Sandboxed apps literally cannot write to~/Documentswithout entitlement and consent. There's even a community term of art for apps that respect this: a \"Mac-assed Mac app\", one that follows the HIG, stores its internals where they belong, and treats the user's folders as the user's. Panic, Omni Group, Bare Bones, Rogue Amoeba, and newer dev tools like Linear, Raycast, and Ghostty all clear that bar without anyone having to file an issue about it.My read on what's happening with Codex App: this isn't a branding move, it's the framework default. Electron and similar toolchains hand you \
os.homedir()\+ a hardcoded folder name, and if nobody on the team owns \"macOS platform fit\", that default ships. It's lazy engineering more than anything malicious, which is almost worse, because it means nobody on the desktop side thought the question was worth asking. The Windows report in this thread (ignoring the registry's actual Documents path and hardcoding \C:\Users\<name>\Documents\Codex\) is the same disease on a different OS: the app assumes one path layout everywhere instead of asking the system.The fix is cheap and well-trodden:
~/Library/Application Support/Codex/\on macOS, \%LOCALAPPDATA%\on Windows, \\$XDG_DATA_HOME\on Linux.~/Documents\until the user explicitly saves something there.That also closes #19909 (iCloud-synced Documents is hostile to chat/code storage) and #19913 (configurable project parent) as side effects.
For a tool aimed squarely at developers, \"respect the platform you ship on\" should be table stakes.
I am also experiencing this on macOS (Darwin). Codex creates
~/Documents/Codexwhich conflicts with iCloud sync — I had to move the directory to~/.codex-workspaceand symlink it back. Would love a configurable default workspace path or at minimum using~/Library/Application Support/Codex/as the default instead. Also related: #19909 #19913.Adding concrete Windows evidence from a local Codex Desktop install, because this is not just a macOS convention issue.
Environment:
OpenAI.Codex_26.527.7698.0_x64Documentsis relocated to another drive:[Environment]::GetFolderPath("MyDocuments")returnsD:\...\Documents$env:USERPROFILEisC:\Users\...Observed behavior:
Codex still creates projectless workspaces under:
So on Windows this is worse than "uses Documents by default": it ignores the OS-configured Documents location and hardcodes a synthetic path under
%USERPROFILE%\Documents.I inspected the installed Desktop bundle. The relevant projectless path builder is desktop-side, not app-server-side:
and the host passes:
to the
projectless-thread-cwd/projectless-workspace-roothandlers.The projectless directory creation then does roughly:
This explains why Windows Known Folder redirection is ignored:
os.homedir()givesC:\Users\<user>, and the app appendsDocuments\Codexmanually instead of asking the platform where Documents or application data actually live.I also checked the visible
openai/codexsource tree. The Rust app-server already accepts a caller-providedcwdinthread/start; it is not the component deciding that projectless workspaces belong inDocuments. The Desktop host computes the projectlesscwdbefore app-server sees it.This also does not appear to be configurable through
~/.codex/config.toml. The config schema has path-ish settings such aslog_dirandsandbox_workspace_write, but nothing likeprojectless_workspace_root,default_workspace_root,projectless_output_dir, or a "do not create projectless directories" option.Suggested fix:
Documents/Codexon app launch.~/Library/Application Support/Codex/or Electronapp.getPath("userData")%LOCALAPPDATA%\OpenAI\Codex\.../ Electronapp.getPath("userData")$XDG_DATA_HOME/codexor~/.local/share/codexDocumentsis used at all, use the OS-provided Known Folder / Electronapp.getPath("documents"), notos.homedir() + "/Documents".This issue should probably be treated as two bugs plus one missing setting:
The current behavior is especially painful on machines with a small system drive, redirected Documents, or cloud-synced Documents. It silently consumes space in the wrong place and makes projectless chats look like user files even though they are app bookkeeping.
Related issue cluster / evidence that this is not isolated:
Directly about
Documents/Codex, projectless/chats storage, or default project folders:~/Documents/Codexfolder on every launch.C:\Users\<user>\Documents\Codexeven when the Windows Documents known folder points to another drive.Adjacent UX/state issues caused by the same underlying model problem: thread/workspace/project location is implicit, sticky, hard to inspect, and hard to change later:
So this is not one macOS paper-cut and not one Windows path bug. It is a broader Desktop product-model problem:
~/Documents.%LOCALAPPDATA%vs user documents.A proper fix should probably cover all of these at once:
Documents/Codexon launch;Maybe this whole bunch need some kind of rethink (proably $superpowers:brainstorming skill) but more with human-minded design approach if the app is still meant to be used by humans cause for now emails offering to try the Codex App looks a bit disappointing considering I spend more time using workarounds like soft links instead of enjoying anything app-related.
if sync ~/Document with icloud and run something through codex chat mode, it may sync entire node_modules into iCloud!
This is clearly an issue affecting multiple people's ability to work and use the program. I wonder how long this issue will sit before it gets fixed?
In my ticket I noticed Codex ignores the operating system. It creates %USERPROFILE%\Documents, in the c: drive where the profile lives under c:\Users even when Windows reports Documents is on the d: drive at say d:\documents. It is hard-coded to make this %USERPROFILE%\Documents. Just poor/lazy coding tbh.
Given this would be such an easy dev fix, and not being addressed, worth uninstalling the app TBH.
I don't understand why Codex does not allow the user specify a default project folder.
July 3rd. Issue opened May 3rd. Countless related issues and users affected. Still unresolved. Keep this in mind next time the renewal is up, we are paying to be ignored.
+1 launch behaviour still re-creates/uses that path across runs.
we all want one thing: the ability to set and move the workspace location.
Please add a clear path choice (in settings or on first run/project setup), and persist it.
No hidden defaulting to
~/Documents/Codexwithout user choice.Let users simply choose workspace folder once, store it in preferences, allow change/update later.
This behavior is extremely user-hostile.
~/Documentsis user-owned space and, on macOS, is very commonly synced through iCloud. Codex should not silently create and repeatedly recreate~/Documents/Codex, especially when there is no supported setting to move projectless workspaces somewhere appropriate such as~/Library/Application Support/Codexor a user-selected directory.What makes this substantially worse is that Codex explicitly rejects symbolic links with
Projectless thread directory must be a real directory. Users are therefore denied even the standard Unix escape hatch for working around a bad hardcoded path. Hardcoding the location, providing no configuration, and then deliberately blocking symlink-based redirection is an unusually hostile combination.Please either make the projectless workspace root configurable, respect a symlink after resolving and validating its target, or stop putting internal workspace scaffolding in Documents. There is no reasonable justification for forcing this location.
I would really appreciate it if the default behavior of Codex creating a folder under my Documents directory could be reconsidered. I use this directory for my personal files synced via iCloud, and it would be incredibly helpful to have an option to set a custom path. I am really looking forward to seeing this issue resolved soon.
Codex should obtain the Documents folder location using the Windows Known Folder API (FOLDERID_Documents / SHGetKnownFolderPath) or another supported Windows API rather than constructing the path from %USERPROFILE%.
Additionally, providing a user-configurable setting for the projectless thread storage location would give users greater control and better align with common Windows workflows.
Still unassigned. Ignored. Codex could fix this bug in 4 minutes...
Seriously? How much slop does there have to be for this issue to remain unresolved to this day?