Windows Codex + WSL project: older threads lose cwd and terminal tries to cd into malformed WindowsApps/app/resources/\\wsl$ path
What version of the Codex App are you using (From “About Codex” dialog)?
26.513.40821
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Title: Windows Codex + WSL project: older threads lose cwd and terminal tries to cd into malformed WindowsApps/app/resources/\\wsl$ path
Client:
- Codex app on Windows, using a WSL Ubuntu project
App/OS:
- Codex app: 26.513.40821
- Windows + WSL (Ubuntu)
Project:
- Originally added via Linux path: /home/ubuntu/spec-kit
Issue summary:
After updating the Codex app, older chats for a WSL-based project are no longer associated with the project correctly. Opening the terminal from an old chat fails because the chat’s saved working directory becomes a malformed Windows path that concatenates the app resources directory with a \\wsl$\ UNC path.
Steps to reproduce:
1) Open Codex desktop on Windows.
2) Open/use a project located in WSL at: /home/ubuntu/spec-kit
3) After updating Codex, open an older chat from the same project via Search or “All chats”.
4) Observe the old chat appears in global history but not correctly under the project.
5) Open the terminal from that old chat.
Expected:
- Older chats remain attached to the WSL project at /home/ubuntu/spec-kit
- Terminal opens in /home/ubuntu/spec-kit
Actual:
- Old chat shows: “Current working directory missing. This chat's working directory no longer exists.”
- Terminal attempts to cd into:
/mnt/c/Program Files/WindowsApps/OpenAI.Codex_26.513.4821.0_x64__2p2nqsd0c76g0/app/resources/\\wsl$\Ubuntu\home\ubuntu\spec-kit
- Fails with: bash: cd: ... No such file or directory
Working directory values observed:
- New chat cwd: /home/ubuntu/spec-kit
- Old chat cwd:
/mnt/c/Program Files/WindowsApps/OpenAI.Codex_26.513.4821.0_x64__2p2nqsd0c76g0/app/resources/\\wsl$\Ubuntu\home\ubuntu\spec-kit
Timing:
- Started immediately after a recent Codex app update to 26.513.40821
- Observed: 2026-05-17 (UTC)
Additional notes:
- Looks like a Windows/WSL path normalization regression: \\wsl$\Ubuntu\home\ubuntu\spec-kit is being treated as relative to the app resources directory instead of resolved to /home/ubuntu/spec-kit.
What steps can reproduce the bug?
Feedback ID: 019e373b-c49d-7d73-8a33-06b1637c3a55
What is the expected behavior?
After update chats in WSL project remain attached to the project
Additional information
Following settings were enabled during project creation and update:
Agent environment: Windows Subsystem for Linux
Integrated terminal shell: WSL
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I’m seeing the same after rebooting Windows. My project-specific sessions disappeared from the project sidebar, but Search can still find and open them. When opened, the thread shows:
Current working directory missing
This chat's working directory no longer exists
The project directory still exists normally in WSL. This looks like the same cwd/path normalization issue rather than deleted sessions.
I hit what looks like the same class of Windows + WSL path normalization/sidebar indexing regression after updating Codex in-app to
0.139.0.Environment
0.139.026.609.41114runCodexInWindowsSubsystemForLinux = true/home/<user>/dev/brain\\wsl.localhost\Ubuntu\home\<user>\dev\brain\\wsl$\Ubuntu\home\<user>\dev\brainSymptoms
After the update, this was not isolated to one project:
Local investigation
The data was still present locally:
C:\Users\<user>\.codex\sessionssession_index.jsonlstill listed the recent chats.state_5.sqlitestill contained the thread rows.The issue appeared to be path normalization/grouping in the local thread index. In
state_5.sqlite, recent WSL-backed threads were keyed with mixed paths such as:But the visible project roots/sidebar entries were keyed with WSL UNC paths such as:
This made the chats searchable but not grouped correctly under Projects, and in some cases Codex tried to resolve a non-existent Windows path like:
Workaround that restored the sidebar grouping
After fully closing Codex, I backed up:
Then I updated the
threads.cwdvalues instate_5.sqlite, mapping Linux/incorrect Windows paths back to the WSL UNC project paths. After reopening Codex, the recent chats appeared under Projects again.Remaining banner and workaround
After repairing
threads.cwd, the sidebar grouping was fixed, but the banner still appeared above opened chats:That disappeared only after creating a Windows symlink so the mistaken Windows path pointed to the real WSL filesystem location:
Once that returned
True, reopening Codex removed the banner.Expected behavior
/home/...\\wsl.localhost\...\\wsl$\...C:\home\....Actual behavior
This looks like a Windows app
0.139.0/ build26.609.41114WSL path normalization or sidebar indexing regression.