Codex Desktop remote project picker shows WSL folders when SSH host is selected

Resolved 💬 2 comments Opened Apr 21, 2026 by yongkang-yang Closed Apr 21, 2026

Codex Desktop remote project picker shows WSL folder tree for win host

Summary

On Codex Desktop for macOS, Add remote project shows the wrong folder tree for a Windows SSH host.

The host selector is set to win, but the picker path is /home/ykyan and the directory listing matches my separate wsl host instead of the Windows machine.

The SSH transport to win is healthy and the actual remote shell on win starts in the correct Windows home directory, so this looks like a Codex Desktop host/picker state mix-up rather than an SSH configuration problem.

Environment

  • Codex Desktop: 26.417.41555
  • macOS: 26.4.1
  • SSH remote hosts in ~/.ssh/config: wsl, win
  • win server OS: Microsoft Windows [Version 10.0.26220.7755]
  • win SSH server: OpenSSH_for_Windows_10.0p2 Win32-OpenSSH-GitHub

Repro steps

  1. Enable remote connections in ~/.codex/config.toml:

``toml
[features]
remote_connections = true
``

  1. Configure two SSH aliases:
  • wsl -> Linux/WSL host
  • win -> Windows host
  1. Open Codex Desktop on macOS.
  2. Open Add remote project.
  3. Select remote host win.

Actual result

  • The folder input shows /home/ykyan
  • The folder list matches the WSL machine, not the Windows machine
  • Add project stays disabled with Choose an existing folder on this remote host.

Examples from the wrong listing:

  • anthropics-skills-tmp
  • clawd
  • deer-flow
  • ghostty
  • github-repo
  • go

Expected result

When win is selected, the picker should show the Windows host's file tree, starting from the Windows home directory or another valid Windows path for that host.

Why this looks like a Codex Desktop bug

The win host itself is healthy and returns the expected Windows-side home directory:

$ ssh win 'sh -lc '\''pwd; printf "HOME=%s\n" "$HOME"'\'''
/c/Users/ykyan
HOME=/c/Users/ykyan

$ ssh win 'cmd /c echo USERPROFILE=%USERPROFILE%'
USERPROFILE=C:\Users\ykyan

I also verified that another remote client against the same win alias works after the shell fix, so the SSH target itself is not the problem.

Evidence suggesting host state is mixed in the app

Codex local logs show both hosts being restored/reconnected in the same session, including:

[AppServerTransportSshWebsocket] ... sshAlias=win ...
[AppServerConnection] Transport start success ... hostId=remote-ssh-discovered:win
...
[electron-message-handler] Failed to sync experimental feature enablement ... hostId=remote-ssh-discovered:wsl
...
[AppServerConnection] websocket_reconnect_recovery_done ... hostId=remote-ssh-discovered:wsl

File inspected:

  • ~/Library/Application Support/Codex/sentry/scope_v3.json

Troubleshooting already tried

  • Fixed the Windows SSH shell/bootstrap path so Codex can connect successfully to win
  • Upgraded win OpenSSH so the connection now negotiates PQ KEX correctly
  • Verified win returns /c/Users/ykyan as the actual remote working directory
  • Cleared Codex Desktop local cache/state:
  • ~/Library/Application Support/Codex/Session Storage
  • ~/Library/Application Support/Codex/Local Storage
  • Removed stale WSL recent workspace paths from local shared DB state
  • Fully restarted Codex Desktop

The picker still shows the WSL directory tree when win is selected.

Notes

  • I have a screenshot showing Remote host = win while the picker path is /home/ykyan and the listing matches WSL.
  • I can provide additional logs if needed.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗