codex - 💡(How to fix) Fix Codex desktop terminal uses stale workspace path after project directory is renamed [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20934Fetched 2026-05-05 05:56:02
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1unlabeled ×1

After renaming a project directory from within a Codex desktop session, the top-right terminal toggle can still try to open or cd into the old workspace path. The agent can use the new path explicitly, but the terminal/workspace context appears to remain stale, so the UI and agent context are out of sync.

Root Cause

After renaming a project directory from within a Codex desktop session, the top-right terminal toggle can still try to open or cd into the old workspace path. The agent can use the new path explicitly, but the terminal/workspace context appears to remain stale, so the UI and agent context are out of sync.

Code Example

/Users/mingqxu/Documents/New project

---

/Users/mingqxu/Documents/Scientific Research

---

cd '/Users/mingqxu/Documents/New project'
# cd: no such file or directory: /Users/mingqxu/Documents/New project

---

/Users/mingqxu/Documents/Scientific Research
RAW_BUFFERClick to expand / collapse

Summary

After renaming a project directory from within a Codex desktop session, the top-right terminal toggle can still try to open or cd into the old workspace path. The agent can use the new path explicitly, but the terminal/workspace context appears to remain stale, so the UI and agent context are out of sync.

What happened

Original workspace path:

/Users/mingqxu/Documents/New project

The folder was renamed to:

/Users/mingqxu/Documents/Scientific Research

After the rename, using the top-right terminal toggle still attempted to use the old path. In the terminal:

cd '/Users/mingqxu/Documents/New project'
# cd: no such file or directory: /Users/mingqxu/Documents/New project

The renamed folder exists:

/Users/mingqxu/Documents/Scientific Research

Expected behavior

Codex desktop should keep the terminal/workspace path in sync after a project directory is renamed, or detect that the original cwd no longer exists and prompt the user to select/remap the workspace directory.

At minimum, the terminal toggle should not keep sending users into a deleted/stale cwd without a clear recovery path.

Actual behavior

The terminal still targets the old directory name after the project folder was renamed, causing cd: no such file or directory and leaving the user-facing terminal state inconsistent with the actual project path.

Reproduction steps

  1. Open a Codex desktop session in a project directory, for example /Users/<user>/Documents/New project.
  2. Rename that directory to a new name, for example /Users/<user>/Documents/Scientific Research.
  3. Use the top-right terminal toggle in the same Codex session.
  4. Observe that the terminal still tries to use the old path and fails with cd: no such file or directory.

Environment

  • Product: Codex desktop app
  • Platform: macOS
  • Shell: zsh
  • Observed date: 2026-05-04

extent analysis

TL;DR

Update the Codex desktop session to recognize the renamed project directory by restarting the session or manually updating the workspace path.

Guidance

  • Verify that the project directory has been successfully renamed and exists at the new path.
  • Try restarting the Codex desktop session to see if it updates the terminal/workspace path.
  • If the issue persists, check if there's an option to manually update the workspace directory in the Codex desktop settings or configuration.
  • Consider reporting this as a bug to the Codex desktop development team, as the expected behavior is for the terminal/workspace path to be kept in sync after a project directory is renamed.

Example

No code snippet is provided as this issue appears to be related to the Codex desktop application's behavior rather than a specific code problem.

Notes

This guidance assumes that the issue is specific to the Codex desktop application and its handling of project directory renames. The actual solution may depend on the specific implementation and configuration of the application.

Recommendation

Apply workaround: Manually update the workspace path or restart the Codex desktop session, as the application does not currently handle project directory renames correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Codex desktop should keep the terminal/workspace path in sync after a project directory is renamed, or detect that the original cwd no longer exists and prompt the user to select/remap the workspace directory.

At minimum, the terminal toggle should not keep sending users into a deleted/stale cwd without a clear recovery path.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex desktop terminal uses stale workspace path after project directory is renamed [1 comments, 2 participants]