codex icon indicating copy to clipboard operation
codex copied to clipboard

[Windows/WSL] Add Folder has no distro picker and local Git controls disappear for UNC projects

Open rbogasch opened this issue 1 week ago • 3 comments

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

ChatGPT desktop app 26.1117.31558. Microsoft Store package 26.1117.3838.0 (x64). The Git controls worked on this setup about ten days earlier. The exact earlier build is unknown.

What subscription do you have?

Not provided.

What platform is your computer?

Windows 10 22H2, build 19045.7846, x64. WSL2 distro Ubuntu-26.04. Git for Windows 2.56.0.windows.4 and Git in Ubuntu 2.53.0.

What issue are you seeing?

In Codex, Add Folder in the left sidebar opens a Windows folder picker that does not offer the connected Ubuntu distro as a project host. Ubuntu is visible in File Explorer, so I can copy and paste a path such as \\wsl.localhost\Ubuntu-26.04\home\alex\sample-repo. The project opens, but the local Changes, Commit, and Push controls can be missing.

The desktop Git check used a Windows network path for the WSL checkout and logged Failed to resolve git root and common dir followed by fatal: detected dubious ownership in repository. Git inside Ubuntu resolved the same repository, and the Ubuntu user owned both the checkout and its .git directory. Git for Windows reproduced the ownership error. The app log used the \\wsl$ spelling, and Git for Windows also reproduced the error with \\wsl.localhost.

What steps can reproduce the bug?

  1. Use an existing Git repository under /home/alex/sample-repo in Ubuntu WSL2. Make sure it has a local change and a configured remote.
  2. Open Codex in the Windows ChatGPT app with Ubuntu connected. Select Add Folder in the left sidebar.
  3. Paste \\wsl.localhost\Ubuntu-26.04\home\alex\sample-repo into the Windows folder picker and open the project.
  4. Open a project chat and check for the local Changes, Commit, and Push controls.
  5. Compare git -C /home/alex/sample-repo rev-parse --show-toplevel inside Ubuntu with the same Git check against the UNC path in Windows PowerShell.

What is the expected behavior?

Offer connected WSL distributions in the sidebar’s Add Folder flow. When a project uses the connected Ubuntu distro, use Ubuntu Git for repository detection and the Git controls. A WSL path pasted into the picker should offer to open the project on its matching distro.

Additional information

A Windows Git safe.directory exception for the exact repository restored the controls after reopening the app. Use the UNC spelling that Git reports in its error. For the example \\wsl.localhost path, the equivalent PowerShell command is:

git config --global --add safe.directory '%(prefix)///wsl.localhost/Ubuntu-26.04/home/alex/sample-repo'

The Windows app guide documents opening WSL folders by pasting a UNC path. #60801 covers a missing WSL tab in Connections, and #14182 covers related Git detection symptoms on older Windows builds.

rbogasch avatar Nov 20 '26 15:11 rbogasch

One detail from the same Desktop build (26.1117.31558) may help test the picker fix. In my saved state, the same checkout could be represented as a local project with a UNC path in rootPaths, or as a remote project with hostId = remote-wsl:Ubuntu and a Linux remotePath. Opening the directory successfully did not distinguish the two.

For your Ubuntu-26.04 repro, I'd compare the Add Folder entry with a project opened through the connected distro, on a read-only copy of the desktop state. Does the first appear under local-projects and the second under remote-projects? Comparing those records with the Git command the app logs would show whether the wrong host was selected at project creation or later during Git detection. Your exact-repository trust exception restored the controls; recording the stored host as well would let a regression test cover the requested Ubuntu Git behavior.

rbnrong avatar Nov 21 '26 06:11 rbnrong

Thanks, @rbnrong, for your reply and for pointing me to the WSL connection. I moved my projects over as you suggested. Everything is working for me now, including Toggle Summary.

rbogasch avatar Nov 23 '26 08:11 rbogasch

Thanks for confirming, @rbogasch. Glad moving the projects to the WSL connection brought back Toggle Summary too. On our follow-up with Windows package 26.1117.4957.0, a native Windows chat still ran on the Windows backend even with WSL selected as the integrated terminal. Your comparison adds a useful UI check for the picker: open the same checkout via Add Folder and via the Ubuntu connection, then check which Git runs and whether Toggle Summary appears.

rbnrong avatar Nov 24 '26 11:11 rbnrong