Allow existing threads to update working directory after project folder rename
Open 💬 7 comments Opened Jun 6, 2026 by justyn-clark
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Summary
When a local project folder used by an active Codex thread is renamed, the chat history remains intact but the thread's saved working directory still points to the old path. The app then reports that the current working directory is missing.
Current behavior
After renaming the folder, the existing thread shows:
Current working directory missing
This chat's working directory no longer exists
The only practical workaround I found was to recreate the old path as a symlink to the renamed folder.
Repro
- Start a Codex thread in a local project directory, for example:
/path/anamap-master
- Rename the folder to:
/path/jcnmap
- Return to the existing Codex chat.
- The thread still points at
/path/anamap-masterand reports that the working directory is missing.
Expected behavior
Codex should provide a way to repoint an existing local thread to a new working directory without losing chat history.
Possible UX options:
- Add a thread action to update/select the working directory.
- When the saved working directory is missing, prompt the user to locate the moved/renamed folder.
- Validate that the selected replacement directory exists before updating thread state.
Desired properties
- Preserve existing chat history.
- Preserve thread metadata where possible.
- Preserve workspace continuity.
- Avoid requiring a new thread just because the local folder was renamed.
Workaround
ln -s jcnmap anamap-master
This works, but it leaves a compatibility symlink solely to satisfy the thread's stale cwd metadata.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the duplicate pointer. I reviewed #25498.
This issue is related, but the requested flow here is a narrower recovery path: an existing thread already has a project/working-directory binding, the local folder is renamed or moved, and Codex then reports the working directory as missing. The user needs a safe way to repoint that same thread to the new path without creating a new thread or manually recreating the old path with a symlink.
#25498 covers broader project management, including registering projects and moving/changing project bindings. If that work would include a missing-directory recovery prompt or a direct "update this thread's local working directory" action, then this issue can be closed as covered by #25498. Otherwise, this issue can serve as the focused acceptance case for folder rename/move recovery.
This seems closely related to this focused recovery path, with a symlink-specific variant.
In my case, the project was originally opened through a symlink path:
<old-project-alias-path> -> <real-project-path>
I later removed the symlink while keeping the real project directory intact. After that, Codex Desktop made the existing project chats appear to be missing from the project chat list, even though the session history still existed locally.
The workaround was similar in spirit to recreating the old path: either recreate the symlink, or manually update the saved cwd/project metadata from the removed symlink path to the real project path.
So I think the same recovery flow would solve this case too:
The symlink-specific case may also benefit from storing both the literal cwd and the resolved realpath, or warning when a project is opened through a symlink.
One additional observation from this case: after manually updating the saved cwd metadata, different parts of Codex Desktop did not immediately agree on the updated state.
For example, the thread list/search result showed the updated real project path, while reading the individual thread still appeared to return the old symlink path for a while. After additional metadata/config cleanup and refresh, the UI eventually became consistent again.
So this may not only require a "repoint this thread to a new working directory" action, but also a consistent metadata refresh/reconciliation step across thread list, search, and thread detail state.
I’m seeing the same Windows/Desktop failure mode after moving a project folder, with a short screen recording showing the affected thread UI.
Environment:
C:\Users\<user>\OneDrive\Documentos\invierte.colC:\Users\<user>\OneDrive\Documentos\PRACKTICE PROJECT\CLIENTS REPOS (DO NOT TOUCH)\invierte.colRepro:
Observed:
Expected:
Workaround:
This looks like a concrete Desktop reproduction of the working-directory remapping/reconciliation issue described here.
I built a small portable Agent Skill + standalone Python CLI for this exact workaround on Windows: safely relinking Codex Desktop/CLI workspace history after a project folder is moved or renamed.
Repository: https://github.com/paultheal1en/relinking-codex-workspaces-skill
It provides:
This is an unofficial workaround that edits Codex's local state, so users should close Codex first, inspect the dry-run output, and keep the generated backup until the migrated workspace is verified.
I hit the same issue on Codex App
26.715.52143, macOS26.5.2on Apple silicon, when replacing a temporary local checkout with its stable repository path.This was a bulk case: 23 existing threads were still bound to the old root. The transcripts remained on disk, but there was no supported UI or command to reattach those threads to the new local project.
To preserve the histories, I first created timestamped backups and then had to reconcile several layers of local state:
session_metaandturn_contextworking-directory metadataAfter the migration, I verified that:
This seems like a useful bulk acceptance case for the feature:
A first-class workflow would avoid unsupported manual state edits or compatibility symlinks.