The Working Folder Is Decided at the Beginning
One of the first things that can be confusing in Codex is the working folder.
Before asking AI to write code, you need to know which folder is open and which files Codex is allowed to work with.
A key point is that the default working folder set when a thread is created is not something you can casually change later.
You can still instruct Codex to inspect or work in another folder when permissions and environment allow it. But the thread's default working folder remains tied to the initial setup.
If you choose the wrong folder at the beginning, the rest of the thread becomes harder to manage.
This article is based on the author's user environment as of May 24, 2026, together with OpenAI's public Codex documentation. Codex screens and settings may change over time.
What Using an Existing Folder Means
If you want Codex to work with an existing project, you need to choose the option to use an existing folder.
If you do not, Codex may create a new working folder instead.
Repeating that flow can leave many similar folders under Documents or another default location.
When you choose an existing folder, Codex treats that folder as the starting point for the work.
In other words, choosing an existing folder is not just a visual selection.
It tells the AI where the work begins.
The Working Folder May Not Be Temporary
A Codex working folder is not necessarily a temporary scratch folder.
If you choose an existing folder, it may contain real code, configuration files, documents, and Git metadata.
In Finder, a Git repository can look like an ordinary folder. The hidden .git directory is usually not visible.
If you casually delete that folder, you may delete the local Git repository with it.
Content that has already been pushed to GitHub may be recoverable. But uncommitted changes, local-only files, and local branches can be lost.
That is why a Codex working folder should not be treated as disposable unless you have checked what it actually contains.
Separating an Entry Folder from the Real Project Folder
One practical setup is to separate the Codex entry folder from the real project repository.
For example, you can give Codex a stable empty folder for the thread, then explicitly move to another repository when real work begins.
This keeps the default working folder stable while making the actual target repository explicit.
It can also reduce the risk of accidentally copying temporary images or drafts into a production repository.
However, this setup requires discipline. At the start of work, you need to confirm which folder is the entry point and which folder is the real project.
Do Not Casually Copy Images or Temporary Files
Images and temporary files also need care.
If an image in Downloads is only being reviewed, it should not automatically be copied into the project folder.
Once a file is copied into a Git-managed project, it may become part of the next commit and push.
That is fine when the file is an approved production asset.
But if it is only a draft, screenshot, or temporary generated image, it can create cleanup work later.
A good rule is simple: keep temporary files where they are, and copy them into the project only when they are officially adopted.
Check Before Deleting a Folder
Even if a folder looks like a Codex-only folder, check before deleting it.
Is it really an empty container? Does it contain real project files? Is it under Git control? Are there uncommitted changes?
Finder may not show the hidden .git directory, so visual inspection is not enough.
Before deleting a folder, check it with a terminal or Git client. This small step can prevent losing a local repository or unfinished work.
References
- Working with Codex | OpenAI Academy
- How to get started with Codex | OpenAI Academy
- Get started with Codex | OpenAI
Checked: May 24, 2026
Summary
The Codex working folder is an important setting decided when the thread begins.
The default working folder should be chosen carefully because it is not something you can casually change later within the same thread.
The folder may not be a temporary place. If it is an existing project folder, it can contain code, configuration, documents, and hidden Git metadata.
Because Finder usually hides .git, an ordinary-looking folder may actually be a Git repository. Deleting it can delete local history and uncommitted work.
To use Codex safely, decide the working folder first, separate entry folders and real project folders when useful, avoid copying temporary files into repositories, and check Git status before deleting anything.
Before asking AI to work, organize the workspace. That is the first safety step when using Codex in real work.
