Codex app on Windows: WSL agent mode fails with: Error creating task Invalid request: AbsolutePathBuf deserialized without a base path
What version of the Codex App are you using (From “About Codex” dialog)?
26.325.31654
What subscription do you have?
Business
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What issue are you seeing?
It's very simple: I am switching Agent Environment to Windows Subsystem for Linux from Windows native. Thereafter, I restarted the Codex app, write a prompt to 5.2 xHigh, hit enter, and then an error pops up: Error creating task Invalid request: AbsolutePathBuf deserialized without a base path. All you have to do to recreate it is switch Agent Environment to WSL.
What steps can reproduce the bug?
- Switch Agent Environment to Windows Subsystem for Linux
- Restart Codex app
- Type prompt, hit enter
- Error "Invalid request: AbsolutePathBuf deserialized without a base path" pops up
<img width="528" height="60" alt="Image" src="https://github.com/user-attachments/assets/f3a9660a-c9ee-40d4-8541-1b24d335bb3d" />
What is the expected behavior?
Being able to prompt Codex freely. WSL agent mode should work with a repo in WSL without failing during task creation.
Additional information
Creating a task in WSL agent mode fails with AbsolutePathBuf deserialized without a base path.
I also saw:
wsl: Failed to translate '\\?\UNC\wsl.localhost\Ubuntu\home\[USER]\[WORKSPACE]
Environment:
- Windows
- Codex app
- Repo located in WSL
- WSL agent mode fails
- Windows native agent mode works
In codex-rs/core/config.schema.json, there is a comment stating that deserializing AbsolutePathBuf without a base path will fail unless the path is already absolute.
This appears consistent with the WSL code path failing to provide the correct base path or mishandling WSL/UNC path resolution.
Codex App works in Windows Native.
21 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reviewed #14461 and I do not think this is a duplicate.
#14461 appears to be a startup/init crash when WSL mode and
terminalShell=wslare enabled.My issue is different:
Invalid request: AbsolutePathBuf deserialized without a base pathThey may be related WSL/Windows path-handling bugs, but the failure point and error signature are different.
Also happening with me
Also with me
same problem here
Same here
same for me
Here stuck on login screen, after configure wsl to be environment unable to login, and need to drop .codex folder to go back to windows environment.
Still happening! For me it worked until about a week ago, and after one of the recent updates, Im getting the same exact behavior. Plugins won't load with that same AbsolutePathBuf error, and the same for sending a prompt.
All my work in WSL got cut off completely.
The Codex now has Pets, but the bugs haven't been fixed.
having the same problem, newest updates degraded the windows app
Update
I found a workaround that restored WSL agent mode for me, including project chats being created/saved again and plugins becoming available again.
This may be a related issue rather than the exact same
AbsolutePathBuffailure, but it seems tied to the same Windows/WSL boundary.On my machine,
CODEX_CLI_PATHwas set to a Windows Codex executable even while the app was configured for WSL agent mode:It returned something like:
That appears to be wrong for WSL agent mode. The app was trying to run a Windows
codex.exewhile configured for WSL, which caused WSL mode to break.I checked the WSL runtime cache under:
and found a Linux Codex binary there:
I verified it from PowerShell:
Output confirmed it was a Linux ELF binary and printed a valid Codex CLI version, for example:
Then I set
CODEX_CLI_PATHto that WSL cached binary:After fully closing/reopening Codex, WSL agent mode started working again.
Important detail: this override is global, not scoped by agent mode. So if I switch back to Windows native mode while
CODEX_CLI_PATHpoints to the Linux ELF binary, Codex fails to start with:For Windows native mode, I have to unset it:
So the current workaround is:
This suggests the app/update may be setting or preserving
CODEX_CLI_PATHincorrectly across agent modes, or not scoping it per selected agent environment.I also noticed that projects remain visible across modes, but chats under projects can differ between Windows native and WSL agent mode. WSL-created transcripts appear to be saved under the Windows
.codexdirectory via/mnt/c/Users/<user>/.codex/..., but the UI seems to index/group sessions differently depending on the selected agent environment/path identity.So there may be at least two separate but related problems here:
codex.exethroughCODEX_CLI_PATH, breaking startup/runtime behavior.AbsolutePathBuf/ UNC path translation failures reported in this issue.Also happens with me.
I can confirm this still reproduces on Codex Desktop Windows 26.623.5175.0.
Setup:
Error:
Invalid request: AbsolutePathBuf deserialized without a base path
Important detail:
Using Windows Native for the agent while keeping the integrated terminal shell set to WSL works. The failure only appears when Agent Environment is switched to WSL.
I also appear to be hitting the related non-C drive path mapping issue from #28174. Codex has produced/remembered multiple dialects for the same repo:
A C:\mnt\f junction can help old thread working-directory resolution, but it does not fix new WSL-runtime task creation. New task creation still fails in WSL mode with the AbsolutePathBuf/base path error.
Feedback ID from my report:
no-active-thread-019f0a14-dfd3-7742-8f7a-300942fcb7fb
Related issue I opened:
#30373
I can reproduce the same failure when switching Codex Desktop on Windows to the WSL agent/runtime while the selected workspace path is the Windows UNC form for WSL.
Sanitized setup:
\\wsl$\\Debian12\\home\\<user>\\code\\<private-repo>/home/<user>/code/<private-repo>User-visible errors:
Also seen when starting a conversation:
What seems important in this repro is the path identity mismatch: Desktop is carrying a
\\wsl$\\...Windows UNC path while the agent runtime has been switched to WSL. Using the WSL-native path form (/home/<user>/code/<private-repo>) is the expected representation for the WSL side, while the UNC path appears to be passed into a code path that expects anAbsolutePathBufwith a base path.Expected behavior:
\\wsl$\\<distro>\\...to the corresponding WSL-native path before task creation, or reject that workspace path with a clear actionable message.AbsolutePathBufdeserialization error.I have intentionally redacted the username, machine details, and private repository name from this report.
Additional sanitized worktree-specific repro from Windows Desktop + WSL mode.
Setup:
/home/<wsl-user>/projects/<repo>\\wsl$\<distro>\home\<wsl-user>\projects\<repo>/\\wsl.localhost\<distro>\...codex-cli 0.142.3User-visible failure:
This reproduces when creating a new Codex-managed Worktree thread. Cleaning stale Git worktrees does not resolve it; newly created worktree threads still fail.
Important details from the environment, with private values redacted:
After a failed/new worktree attempt, Git can contain worktree entries whose paths look like the UNC
CODEX_HOMEwas passed into the Linux/Git side as an ordinary relative path, for example:So the failure does not appear to be caused by stale Git metadata alone. The stale worktree entries can be pruned, but the next Worktree thread creation repeats the same path shape.
Expected behavior:
/home/<wsl-user>/.codex/worktrees/....AbsolutePathBuf.\wsl.localhost...and then interpreted relative to the repository root.This looks related to #18506 and #30436, but the extra data point here is specifically that Codex-managed Worktree creation can materialize the bad UNC-derived path inside the repository and continues to reproduce after normal
git worktree prunecleanup.All usernames, machine names, repository names, and full local paths are intentionally redacted.
Another Windows + WSL agent-mode repro, with a fix that differs slightly from the
CODEX_CLI_PATH override reported above — worth noting because the two are opposite.
Environment
Symptom
Every new session fails at init, before any real work:
Error creating task — Invalid request: AbsolutePathBuf deserialized without a base path
Error starting chat — Invalid request: AbsolutePathBuf deserialized without a base path
Diagnosis notes that may help others
deleting config.toml changes nothing.
empty in the WSL shell), i.e. /home/<user>/.codex — NOT the Windows-side
/mnt/c/Users/<user>/.codex. Time spent editing the Windows-side config is wasted.
[Environment]::GetEnvironmentVariable("CODEX_CLI_PATH","User")) was pointing at a
Windows codex.exe while the app was in WSL mode.
What fixed it for me
Clearing the User-level CODEX_CLI_PATH entirely:
[Environment]::SetEnvironmentVariable("CODEX_CLI_PATH", $null, "User")
Then fully quit Codex from the tray (not just close the window) and relaunch.
After that, chat/task creation works again in WSL mode.
Caveat / difference from the earlier workaround
Pointing CODEX_CLI_PATH at the cached Linux ELF core
(C:\Users\<user>\.codex\bin\wsl\<hash>\codex) did NOT work on my build — it failed
with "Failed to spawn Codex CLI at ...\codex", because this launch path tries to
spawn the ELF as a native Windows process. So on this build the fix is to unset
the override, not to redirect it. This suggests the correct value (or whether the
override should exist at all) depends on how the app version does the WSL hand-off,
and that the app may be setting/preserving CODEX_CLI_PATH incorrectly across agent modes.
Unaffected fallback
The standalone WSL CLI (
codexin a WSL shell) works fine throughout — it reads/home/<user>/.codex/config.toml and doesn't go through the desktop path translation.
3 months later the bug is still there...
Codex version:
26.623.141536I was able to restore Codex Desktop + WSL operation, but it required two separate fixes and a manual workspace reassociation after migration.
Original failing setup
F:\veilforge/mnt/f/veilforgeCodex was mixing path formats such as:
New WSL-backed chats and tasks failed with:
Step 1: Restore functionality
The first recovery did not require moving the repository.
I:
CODEX_CLI_PATHwere unsetwsl --shutdownThis stopped the
AbsolutePathBuffailure and restored usable WSL agent sessions.However, the app still felt noticeably sluggish while the repository remained under
/mnt/f.Step 2: Remove the remaining sluggishness
I then migrated the authoritative working copy into the native WSL filesystem:
Windows and Codex Desktop now access the same repository through:
After moving the working tree and dependencies into
/home, the remaining UI and tooling stickiness appears to have resolved.The migrated repository was fully verified:
git fsck --fullfound no corruptionThe original
F:\veilforgerepository remained untouched as a fallback.Step 3: Manually reassociate Codex with the migrated repository
Codex Desktop did not automatically follow the repository from:
to:
After migration, I had to explicitly open the new repository in Codex Desktop using:
and then confirm:
Existing project entries and chats may remain associated with the old Windows or
/mnt/fpath, so they should not be assumed to automatically transfer to the new WSL-native workspace.The migrated repository must be opened as the active Codex workspace so new sessions are rooted in:
rather than the previous mounted-drive path.
Observed result
This suggests at least two separate issues:
There is also a workspace-association limitation: Codex does not automatically recognize that a repository migrated from a Windows or
/mnt/<drive>path is the same Git repository now located under/home.The junction is a usable recovery workaround, but moving the active repository into native WSL storage provides the better long-term experience.
Codex Desktop should normalize Windows drive paths,
/mnt/<drive>paths, Linux paths, and WSL UNC paths into one stable project identity. Users should not need to restructure their repositories to prevent/mnt/f/projectfrom becomingC:\mnt\f\project, and they should not need to manually rebuild the project association after moving the same repository into WSL-native storage.Codex on Windows/WSL is still far too unreliable, and the constant breakage is directly impacting productivity.
Path translation, workspace detection, shell, sandboxing, mount issues etc. keep coming back. A fix lands, then another regression breaks something basic. At this point, it feels like one step forward and three steps backward.
The gap with macOS is obvious. Windows/WSL does not seem to be getting the same level of real-world testing or engineering ownership.
This needs more than another temporary patch. OpenAI needs dedicated Windows/WSL ownership, proper end-to-end regression testing, and release blockers for bugs that break core workflows.
Windows users should not be acting as unpaid regression testers for basic platform support, especially when we are paying customers.
I was able to restore Codex Desktop + WSL operation on Windows after reproducing the same error:
In my case, the root cause was a user-level
CODEX_CLI_PATHenvironment variable pointing to the Windows Codex CLI installed by WinGet, while Codex Desktop was configured to run the agent in WSL.The value looked like this pattern:
That forced Desktop to use the Windows CLI even though the selected agent environment was WSL.
What fixed it:
Then I fully stopped Codex Desktop, shut down WSL, and restarted both:
After relaunching Codex Desktop, I kept the original configuration:
Result:
I verified that
CODEX_CLI_PATHwas empty at Process, User, and Machine scope before reopening Codex.Environment observed:
This may not be the only cause of the issue, but checking for a stale or forced
CODEX_CLI_PATHappears to be a low-risk first troubleshooting step before deleting Codex state or re-adding projects.