Codex desktop terminal uses stale workspace path after project directory is renamed

Open 💬 2 comments Opened May 4, 2026 by mingqxu7

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

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗