Skip to content

Codex App on Windows ignores WSL agent environment and starts projectless threads in local PowerShell with invalid C:\mnt\c path #28302

Closed

Description

@aikannba

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop: 26.609.4994.0 ; Codex CLI: 0.140.0-alpha.2

What subscription do you have?

Nothing

What platform is your computer?

Windows 11 Professional x64;WSL2 Ubuntu is installed and running

What issue are you seeing?

In Codex Desktop on Windows, my settings are configured to use WSL:

  • Agent environment: Windows Subsystem for Linux
  • Integrated terminal shell: WSL

The settings are saved in C:\Users\Administrator\.codex\config.toml:

[desktop]
integratedTerminalShell = "wsl"
runCodexInWindowsSubsystemForLinux = true

However, new projectless Codex App threads are still launched as a local Windows/PowerShell environment instead of WSL. The thread receives an invalid Windows path derived from a WSL path: C:\mnt\c\Users\Administrator\Documents\Codex\2026-06-15\new-chat-3.

This path does not exist on Windows. The correct WSL path is: /mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3

Inside the running Codex session, shell commands execute in Windows PowerShell 5.1, and WSL_DISTRO_NAME is empty.

What steps can reproduce the bug?

  1. On Windows, install/use Codex Desktop.
  2. Enable WSL-related settings:
  • Agent environment: Windows Subsystem for Linux
  • Integrated terminal shell: WSL
  1. Start a new projectless chat/thread.
  2. Observe that the session runs under Windows PowerShell instead of WSL, and the cwd is C:\mnt\c....

I also verified WSL itself works:
wsl.exe -d Ubuntu --cd /mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3 --exec sh -lc 'pwd; uname -s; echo WSL_DISTRO_NAME=$WSL_DISTRO_NAME'
Output:
/mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3
Linux
WSL_DISTRO_NAME=Ubuntu

What is the expected behavior?

When Codex Desktop is configured to use WSL, new projectless threads should launch the agent in WSL, with cwd set to a valid Linux path such as: /mnt/c/Users/Administrator/Documents/Codex/2026-06-15/new-chat-3

The session should not launch as local Windows PowerShell, and should not receive the invalid path: C:\mnt\c\Users\Administrator\Documents...

Additional information

This looks like a Windows/WSL path conversion or environment selection bug in Codex Desktop.
Relevant local state observed:
C:\Users\Administrator.codex\config.toml contains the expected WSL desktop settings.
Codex state/logs record the thread cwd as C:\mnt\c\Users\Administrator\Documents\Codex\2026-06-15\new-chat-3.
The turn environment appears as environment_id: "local" rather than a WSL environment.

Activity

  1. added
    app
    on Jun 15, 2026
  2. added
    bug
    windows-os
    app-server
    on Jun 15, 2026
  3. github-actions commented on Jun 15, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. aikannba commented on Jun 15, 2026

    @aikannba
    Author

    The solution can be find in: #22423 (comment), this case will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions