Codex App: allow configuring default directory for projectless thread workspaces
What version of the Codex App are you using (From "About Codex" dialog)?
26.513.20950 (2816)
What subscription do you have?
ChatGPT user, default service tier shown as fast
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Codex App creates new projectless thread workspaces under a fixed ~/Documents/Codex/<date>/<slug> directory. I want projectless/generated local workspaces to default to a user-chosen directory, for example ~/projects, but I could not find a documented ~/.codex/config.toml setting or app setting for this.
Observed local state for a projectless thread points at:
"thread-workspace-root-hints": {
"<thread-id>": "/Users/<user>/Documents/Codex"
}
The generated workspace for a new projectless thread was:
/Users/<user>/Documents/Codex/2026-05-15/<thread-slug>
I also checked the documented Codex configuration reference and found settings for trusted projects, sandbox writable roots, project root markers, etc., but no documented option for the projectless workspace root/default generated project directory.
What steps can reproduce the bug?
- Open Codex App on macOS.
- Start a new projectless chat/thread rather than opening an existing project folder.
- Ask Codex to create or inspect local files.
- Observe that the current working directory is created under
~/Documents/Codex/<date>/<thread-slug>. - Check
~/.codex/config.tomland the Codex configuration docs for a setting to change this default to another root such as~/projects.
What is the expected behavior?
Codex App should provide a documented setting to choose the default root directory for projectless/generated local workspaces.
For example, either a UI setting or a documented config key such as:
projectless_workspace_root = "/Users/<user>/projects"
With that configured, new projectless threads would be created under:
/Users/<user>/projects/Codex/<date>/<thread-slug>
or another documented structure under the chosen root.
Additional information
Related but distinct issue: https://github.com/openai/codex/issues/10599 covers configuring Git worktree location under ~/.codex/worktrees. This report is about the Codex App's projectless thread workspace location under ~/Documents/Codex.
6 Comments
I can confirm this has a significant real-world impact when the macOS
Documentsdirectory is mirrored by a cloud-storage client.Environment:
26.707.31428(5059)26.4.1(25E253), Apple Silicon127.0.1.0A projectless Codex workspace under:
contained a large repository with
node_modules. Because Google Drive was configured to mirror the standardDocumentsfolder, DriveFS continuously attempted to checksum and upload those generated development artifacts.The observed failure loop repeatedly produced errors such as:
During the loop:
190%CPU and2 GBRAM.drive_fs.txtlog reached approximately128 MBand rotated every 2–3 minutes.This is not merely an organizational preference:
Documentsis commonly selected for iCloud Drive, Google Drive, OneDrive, backup, and enterprise redirection. Putting repositories, dependency trees, symlinks, build outputs, and temporary agent workspaces there can trigger large uploads, indexing, conflict handling, and retry loops without the user realizing that a projectless chat created them.Suggested behavior:
projectless_workspace_root.~/Library/Application Support/Codex/Workspacesor~/.codex/workspaces, rather than~/Documents.Opening an existing project under
~/reposavoids the issue, but it does not address casual/projectless chats, which are precisely where users are least likely to anticipate a generated repository under a cloud-synced Documents folder.I also traced the current public
mainimplementation (4ba28150146e8ae8e949a07951639a929f5ddeae) to identify the smallest likely implementation seam.The public app-server already accepts a client-selected working directory through
ThreadStartParams.cwd:https://github.com/openai/codex/blob/4ba28150146e8ae8e949a07951639a929f5ddeae/codex-rs/app-server-protocol/src/protocol/v2/thread.rs#L56-L75
It also already persists opaque Desktop-owned settings under the
[desktop]config table:https://github.com/openai/codex/blob/4ba28150146e8ae8e949a07951639a929f5ddeae/codex-rs/config/src/config_toml.rs#L496-L502
I could not find the
Documents/Codexliteral or the projectless workspace path-selection logic in the public repository. This suggests the path is selected by the Desktop client before it sendsthread/start, rather than by the Rust app-server.A minimal implementation therefore appears to be Desktop-owned:
desktop.projectlessWorkspaceRootusing the existing opaque Desktop config map.thread/start.cwdvalue.Documentsdirectory.This should not require a new app-server protocol field, and may not require any Rust change at all unless the team prefers a typed config key instead of the existing Desktop settings map.
I understand that external PRs are invitation-only. If there is a useful public-repository portion of this fix and this direction matches the intended architecture, I would be happy to prepare a focused invited PR. Otherwise, I hope this narrows the internal Desktop change enough to make it straightforward to pick up.
This default creates recurring cleanup work for me. Codex generates projectless workspaces under
~/Documents/Codex, although my actual projects live elsewhere. I repeatedly have to inspect and remove this tree manually, while moving or deleting it can break existing threads because they retain the original working directory.This is a bad default for generated development artifacts. Users should be able to configure the workspace root, and Codex should default to an application-data or cache directory rather than
Documents.Please prioritize a supported
projectless_workspace_rootsetting in the desktop UI orconfig.toml.Adding to the chorus of this is a huge issue for corporate users. My company doesn't let me exclude any folders under Documents from OneDrive sync, so now OneDrive and related file operations are constantly pegging my CPU with "Uploading 10,000 files" - and for what it's worth, this was not an issue for me prior to the new ChatGPT Work/Codex app. Thanks for all you do, OpenAI team!
Adding a current macOS data point because the fixed path has a more serious side effect when Documents is synced by iCloud. This is still present in Codex Desktop 26.721.41059 on macOS 26.3.1.
I traced one write spike to a projectless workspace under
~/Documents/Codex. A dependency install created roughly 180knode_modulesentries. Over that 14.5-hour boot, the SSD’s write counter increased by about 745 GB. macOS process counters reported about 503 GB frombird,fileproviderd, andcloudd, versus 3.5 GB from ChatGPT/Codex itself; resource reports also caughtbirdandfileproviderdeach writing about 34 GB in under ten minutes. The Codex log database and WAL stayed unchanged, so this was not the separate SQLite logging bug.I checked for a workaround: this build constructs the projectless root as
~/Documents/Codex, rejects a symlink there, and provides no setting to move it. This means normal high-file-count development work can be placed inside iCloud without the user choosing that, then heavily amplified by FileProvider metadata processing. Making the projectless workspace root configurable would address the problem; a non-iCloud default or warning would also help.Still present on 26.820.60940 (macOS 15.7.9), same structure as reported: ~/Documents/Codex/<date>/<thread-slug>. Reported against 26.513 three months ago, so this isn't version-specific.
My use case is writing and document work rather than code, so most of what Codex generates lands in ~/Documents next to unrelated personal files.
Moving it out afterwards is the part that actually hurts: once a thread is bound to a generated path, moving the folder gives "Current working directory is missing" and there is no way to relink it. Re-adding the folder registers a new project and the chat history is gone.
So the default location isn't only clutter — per thread it's effectively permanent. A documented
projectless_workspace_rootkey would be enough on its own; a UI setting isn't required.