Skip to content

Windows: chat fails with "UNC paths are not supported. Defaulting to Windows directory." when using WSL paths #716

Description

@MansGullberg

Summary

On Windows, chat fails when the app is used with WSL-based paths. I get:

UNC paths are not supported. Defaulting to Windows directory.

This appears to be caused by the app or one of its spawned processes using a UNC WSL path such as:

\\wsl.localhost\Ubuntu\home\<user>\...

instead of a normal Windows drive path.

Environment

  • App: T3 Code for Windows
  • Version: v0.0.9
  • OS: Windows 11
  • WSL: Ubuntu
  • Repo/files located in WSL, for example:
    • \\wsl.localhost\Ubuntu\home\<user>\...

What I expected

Chat should work when the project or Codex-related files are in WSL, or the app should convert the WSL path to a supported working directory before spawning the shell/process.

What actually happens

The app shows:

UNC paths are not supported. Defaulting to Windows directory.

After that, chat/session behavior breaks because the process is no longer running in the intended project directory.

Image

Reproduction

  1. Open T3 Code on Windows.
  2. Use a project that lives in WSL, or otherwise make the app work against a WSL UNC path like:
    • \\wsl.localhost\Ubuntu\home\<user>\project
  3. Start a chat/session.
  4. The app throws:
    • UNC paths are not supported. Defaulting to Windows directory.

Notes

I also tried moving CODEX_HOME to a normal Windows path (C:\Users\<user>\.codex) so it would not point into WSL anymore.

That did not resolve the problem, which suggests the failing UNC path is likely the workspace/current working directory or another path the app passes into the spawned shell, not just CODEX_HOME.

Possible root cause

This looks like a Windows cmd.exe / process-launch limitation with UNC working directories. If the app starts a shell/process with a current directory like \\wsl.localhost\..., Windows falls back to C:\Windows instead.

Suggested fix

  • Detect WSL UNC paths before launching the chat process.
  • Avoid launching Windows shell commands with a UNC current working directory.
  • Either:
    • support WSL execution directly, or
    • translate/mount the path to a drive-letter path before launch, or
    • show a clear error that WSL paths are not currently supported.

This issue report was generated by GPT-5.4 on High running in the Codex app on Windows in a WSL environment.

Activity

  1. Shivam8584 commented on Mar 12, 2026

    @Shivam8584

    Another +1 from Windows + WSL with the Codex provider specifically.

    Repro details from my setup:

    • Project opened from a WSL path like \\wsl.localhost\Ubuntu\home\ubuntu\Projects
    • Codex CLI installed inside WSL and works there
    • The desktop app appears to launch the provider/version check through Windows cmd.exe instead of inside WSL

    Observed errors in the app:

    • Codex CLI is installed but failed to run. 'codex' is not recognized as an internal or external command, operable program or batch file.\n- Codex CLI version check failed. \\wsl.localhost\Ubuntu\home\ubuntu\Projects CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. The system cannot find the path specified.\n\nThis makes the current Windows app path/provider flow incompatible with WSL-hosted workspaces even when Codex itself is correctly installed in Linux.\n\nA robust fix would be first-class WSL execution support, or at minimum detecting WSL UNC workspaces and failing with a clear actionable message instead of attempting a Windows-side launch in a UNC cwd.
  2. shivamhwp commented on Mar 24, 2026

    @shivamhwp
    Collaborator

    @Shivam8584 @MansGullberg , try the latest version of both codex and t3code and tell me if it's still happening. !!

  3. MansGullberg commented on Mar 28, 2026

    @MansGullberg
    Author

    @shivamhwp @MansGullberg , try the latest version of both codex and t3code and tell me if it's still happening. !!

    Still happening. Codex app works fine, not T3 Code v 0.14

  4. MansGullberg commented on Mar 29, 2026

    @MansGullberg
    Author

    @shivamhwp Found a hackable workaround for now in v 0.15:

    this file on desktop: codex-wsl.cmd:

    @echo off
    setlocal
    
    set "WSL_EXE=%SystemRoot%\System32\wsl.exe"
    set "WSL_DISTRO=Ubuntu"
    set "WSL_USER=redacted"
    set "CODEX_WSL_PATH=/mnt/c/Users/redacted/.codex/bin/wsl/codex"
    
    if not exist "%WSL_EXE%" (
        echo Failed to find wsl.exe at "%WSL_EXE%".
        exit /b 1
    )
    
    "%WSL_EXE%" -d %WSL_DISTRO% -u %WSL_USER% --shell-type login "%CODEX_WSL_PATH%" %*
    exit /b %ERRORLEVEL%
    

    Codex binary path set in t3 code: C:\Users\redacted\Desktop\codex-wsl.cmd


    CODEX_HOME path set in t3 code: \wsl.localhost\Ubuntu\home\redacted.codex

    --

    Now the desktop app can authenticate and talk to Codex. However, checkpoint capture fails because the app appears to use Windows Git on the WSL UNC repo path, and Windows Git does not trust that repo by default. So I ran: git config --global --add safe.directory "*" in powershell and now all warnings are gone. 👍

    --

    Last problem, toggling terminal drawer fails because of UNC path and defaults back into windows as cmd. Would be nice to be able to select terminal preferences in the settings.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions