AgentFixFind a fix
CodexPartial workaroundUpdated Aug 20, 2026

Codex rewrites a WSL /mnt project path to a Windows drive

Fix Codex Linux Desktop in WSL2 when a valid /mnt project is displayed as D:\path and reported deleted or moved.

Exact error

Match the message before using the fix

Project folder was deleted or movedStart new chat disabled for a valid /mnt projectA valid /mnt/d/... project is displayed as D:\...

Quick answer

Start here

Check the path shown in the Codex sidebar. If a native Linux Codex Desktop process inside WSL displays `/mnt/d/project` as `D:\project` and says the folder moved, the source report found that projects under the WSL Linux filesystem, such as `/home/...`, remained usable. Move or clone the project into `/home`, or use native Windows Codex for a repository that must stay on a Windows drive. The issue is closed but no shipped fixed version is documented in the report.

Diagnosis

Why it happens

  • The source report found the persisted project root remained a valid `/mnt/...` path.
  • The Electron renderer converted the Linux path into Windows drive syntax, then the Linux execution host could not stat that converted path.
  • This narrow Linux-Desktop-inside-WSL setup is distinct from native Windows Codex using WSL as its agent environment.

Safest first

Fixes, in order

01

Confirm the path was rewritten rather than deleted

Applies when: When the sidebar says a project moved but the directory still exists in WSL

The distinguishing evidence is a Windows drive path shown by a Linux app while the original `/mnt` directory remains accessible.

  1. Open a WSL terminal in the same distribution used by Codex.
  2. Confirm the original `/mnt/<drive>/...` directory exists and is readable.
  3. Compare that path with the path displayed in the Codex sidebar.
  4. Do not edit persisted state if it already contains the correct Linux path.
pwd
ls -la /mnt/d/your-project

Expected: WSL can read the project, while Codex displays a converted `D:\...` path.

02

Use the WSL Linux filesystem for the project

Applies when: Native Linux Codex Desktop running through WSLg

The reporter confirmed projects under `/home` remained usable because they did not cross the drive-path converter.

  1. Commit or back up current work in the mounted-drive repository.
  2. Clone or copy the project to a directory under your WSL home.
  3. Open that Linux-filesystem path as a new Codex project.
  4. Keep the old project entry until the new copy is verified.

Expected: The sidebar preserves the `/home/...` path and Start new chat is enabled.

03

Use native Windows Codex for a Windows-drive repository

Applies when: When the repository must remain under a Windows drive letter

Keeping the app and repository in the same path namespace avoids asking a Linux process to stat a Windows path.

  1. Close the Linux Desktop app running through WSLg.
  2. Open the supported native Windows Codex installation.
  3. Add the repository through its Windows drive path.
  4. Create a new task rather than resuming a task bound to the old path namespace.

Expected: The Windows app recognizes the drive path and the project is available for new chats.

Verification

Prove the fix worked

  1. Restart the selected Codex app mode.
  2. Confirm the sidebar path uses the same namespace as the running app.
  3. Start a new chat and run a harmless working-directory check.

Escalation

If it still fails

  • Record Windows build, WSL distribution, Codex app package, displayed path, persisted path, and the output of a WSL filesystem check.
  • Do not hand-edit `.codex-global-state.json` when it already stores the correct path.
  • If `/home` projects also fail, this is not the same renderer conversion branch.

Scope

Environment and version notes

  • The detailed report used the Codex 26.803 Ubuntu package inside WSL2/WSLg on Windows 10.
  • The upstream issue was closed, but its page did not identify a shipped fixed version as of August 20, 2026.
  • Sources rechecked August 20, 2026.

Evidence

Sources

Source labels describe the evidence available on the checked date. A closed issue is not automatically a shipped fix.