Windows Codex Desktop fails to load custom pets when app-server runs in WSL because CODEX_HOME path is not normalized
What version of the Codex App are you using (From “About Codex” dialog)?
26.429.61741
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows 11 Pro, build 26200, x64
What issue are you seeing?
Summary
On Windows, Codex Desktop fails to discover custom pets when the app-server is configured to run in WSL.
The custom pet loader builds a mixed Windows/POSIX path:
C:\Users\<USER>\.codex/pets
instead of the WSL-accessible path:
/mnt/c/Users/<USER>/.codex/pets
As a result, Settings -> Appearance -> Pets -> Refresh shows the bad path and returns no custom pets, even though the pet package exists and validates.
## Environment
- OS: `Microsoft Windows 11 Pro
- OSArchitecture:
64-bit - OsBuildNumber:
26200 - Codex Desktop package:
OpenAI.Codex_26.429.8261.0_x64__2p2nqsd0c76g0 - App version observed in package:
26.429.61741 - App-server configured to run through WSL
- Custom pet installed at:
C:\Users\<USER>\.codex\pets\<pet-id> - WSL equivalent path:
/mnt/c/Users/<USER>/.codex/pets/<pet-id>
## Expected behavior
Refreshing custom pets should discover valid pets from the local Codex home. If the app-server is using POSIX/WSL paths, a Windows Codex home should be
normalized to /mnt/<drive>/... before joining pets or avatars.
## Actual behavior
The loader passes:
C:\Users\<USER>\.codex/pets
The WSL app-server cannot discover the package, so the custom pet does not appear.
## Evidence
A local dry-run ASAR patch confirmed the minimal behavior change.
Before:
path.posix.join("C:\\Users\\<USER>\\.codex", "pets")
=> C:\Users\<USER>\.codex/pets
After normalizing the Codex home when preferWsl is true:
/mnt/c/Users/<USER>/.codex/pets
The verifier then discovered the custom pet from:
/mnt/c/Users/<USER>/.codex/pets/<pet-id>/pet.json
## Proposed fix
In the app-side custom avatar/pet loader, normalize a Windows drive-path Codex home when preferWsl is true before constructing pets and avatars.
Conceptually:
``ts/mnt/${codexHome[0].toLowerCase()}/${codexHome
function normalizeCodexHomeForWsl(codexHome: string, preferWsl: boolean): string {
if (preferWsl && /^[a-zA-Z]:[\\/]/.test(codexHome)) {
return
.slice(3)
.replace(/\\/g, "/")}`;
}
return codexHome;
}
This should be scoped to custom pet/avatar discovery and should not change global CODEX_HOME, app-server launch behavior, terminal command execution,
workspace paths, skills, agents, or file browsing helpers.
### What steps can reproduce the bug?
1. On Windows 11, install Codex Desktop from the default Windows app package.
2. Configure Codex Desktop to run the app-server through WSL.
3. Create a valid custom pet package under the Windows Codex home:
`C:\Users\<USER>\.codex\pets\<pet-id>\pet.json`
`C:\Users\<USER>\.codex\pets\<pet-id>\spritesheet.webp`
4. Open Codex Desktop.
5. Go to Settings -> Appearance -> Pets.
6. Click Refresh custom pets.
7. Observe that the custom pet is not listed, and the displayed custom pets path is a mixed Windows/POSIX path like:
`C:\Users\<USER>\.codex/pets`
### What is the expected behavior?
Codex Desktop should discover valid custom pets from the local Codex home when the app-server is running through WSL.
When `preferWsl` is true and the resolved Codex home is a Windows drive path, the custom pet/avatar loader should normalize it before joining `pets` or
`avatars`.
Expected path:
`/mnt/c/Users/<USER>/.codex/pets`
instead of:
`C:\Users\<USER>\.codex/pets`
### Additional information
A local dry-run ASAR patch confirmed the narrow fix.
The loader currently appears to build the custom pets path by joining a Windows Codex home with a POSIX path implementation:
`path.posix.join("C:\\Users\\<USER>\\.codex", "pets")`
=> `C:\Users\<USER>\.codex/pets`
After normalizing the Codex home when `preferWsl` is true, the loader-like verifier discovers the custom pet from:
`/mnt/c/Users/<USER>/.codex/pets/<pet-id>/pet.json`
Suggested scope: fix only custom pet/avatar discovery. This should not change global `CODEX_HOME`, app-server launch behavior, terminal command execution,
workspace paths, skills, agents, or file browsing helpers.This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗