You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Terminal fails with "Terminal cwd does not exist" after the project directory is renamed mid-thread #16923
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
Not sure
Steps to reproduce
Open a project in the nightly build and start (or open) a thread.
While the thread is open, rename the project's directory on disk (e.g. /path-to-project -> /path-to-project-renamed).
In the same thread, press the "open terminal" button.
Expected behavior
The app should let the user relocate the project/thread to the renamed directory. Failing that, either a terminal opens, or the app clearly tells the user that the project directory no longer exists and how to fix it (for example relocating or re-linking the project). A terminal should not silently end up unavailable.
Actual behavior
No terminal shows up, and the only feedback is the message:
[terminal] Terminal cwd does not exist: /path-to-project
The message comes from the terminal cwd validation error in packages/contracts/src/terminal.ts. It refers to the old path and gives no hint that the project was renamed or moved, or what to do next.
The thread itself also stops working. Sending to it fails with:
This thread's workspace folder no longer exists or is not a directory: /path-to-project. Restore the folder at this path before retrying.
So the thread is unusable until the folder is restored at the old path. There is no way to point the thread or project at the renamed directory from within the app.
Impact
Minor bug or occasional failure
Version or commit
Nightly build (exact nightly version not captured)
Environment
Ubuntu 24.04 on WSL2 (Linux 6.18.33.2-microsoft-standard-WSL2), T3 Code nightly desktop build
Logs or stack traces
[terminal] Terminal cwd does not exist: /path-to-project
This thread's workspace folder no longer exists or is not a directory: /path-to-project. Restore the folder at this path before retrying.
Workaround
Renaming the directory back to its original name, as the thread error suggests (not verified).
Reproduced in the Linux web client on current main a12d6ed, using an isolated dev server and a throwaway Git repository.
Added /tmp/triage-16923/project, started a Codex thread, renamed the directory to project-renamed, then opened the terminal. It displayed [terminal] Terminal cwd does not exist: /tmp/triage-16923/project. A follow-up message failed with the reported workspace-folder error. Renaming the directory back and opening a new terminal succeeded.
The terminal error lacks the recovery instruction already present in the thread error. No matching duplicate found among open issues from the last 90 days. Nightly desktop/WSL2 was not tested.
Activity
juliusmarminge commentedon Oct 22, 2026
Reproduced in the Linux web client on current main a12d6ed, using an isolated dev server and a throwaway Git repository.
Added
/tmp/triage-16923/project, started a Codex thread, renamed the directory toproject-renamed, then opened the terminal. It displayed[terminal] Terminal cwd does not exist: /tmp/triage-16923/project. A follow-up message failed with the reported workspace-folder error. Renaming the directory back and opening a new terminal succeeded.The terminal error lacks the recovery instruction already present in the thread error. No matching duplicate found among open issues from the last 90 days. Nightly desktop/WSL2 was not tested.