Windows app PR button falsely says GitHub CLI is not installed
Resolved 💬 12 comments Opened Mar 6, 2026 by Dj-Shortcut Closed May 6, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
Summary
The "Create PR" button says GitHub CLI (gh) must be installed, but gh is already fully available inside the app environment.
What version of Codex is running?
Desktop app on Windows (current as of March 6, 2026)
What platform is your computer?
Windows 11
Steps to reproduce
- Open the Codex desktop app on Windows
- Open a repo with git + GitHub configured
- Hover or use the PR button
- The UI says GitHub CLI must be installed
Expected behavior
The PR button should recognize the installed gh CLI and allow PR creation.
Actual behavior
The UI says GitHub CLI is not installed.
Verification done inside the app terminal
gh --versionworksgh auth statusworksC:\Windows\System32\where.exe ghreturnsC:\Program Files\GitHub CLI\gh.exe
Conclusion
This appears to be a stale or incorrect gh-detection bug in the PR button UI, not a local installation issue.
12 Comments
Are you running the app from within WSL or in native Windows mode? If it's within WSL, I think it won't be able to see the
ghinstalled in Windows\System32.I verified:
Shell is C:\WINDOWS\system32\cmd.exe
%WSL_DISTRO_NAME% is not set
gh is visible on PATH as C:\Program Files\GitHub CLI\gh.exe
gh --version returns 2.87.3 from February 23, 2026
So this is not a WSL-vs-Windows visibility issue. The more likely problem is the app’s own detection logic or how it launches the check. One relevant detail: when commands are started with the \\?\C:\... style working directory, cmd.exe reports that path as unsupported and falls back to the Windows directory. That may be interfering with the app’s environment handling.
Small additional data point in case it helps the detection logic:
So
ghis resolvable through PATH from the same shell environment.If the app checks availability via
spawn/which/where, it should normally succeed.Let me know if there is a specific command the app uses for detection and I can test that as well.
I am having the exact same issue!
I have the same issue. I even had the agent try it so I know it's available to the agent in the environment that the agent uses (I run the Windows version of the app and it is using WSL for the agent environment). The agent ran the command and got:
and if I try it in my own terminal (inside of the Codex app, which in my case is powershell):
So the cli is available on both systems which points to a Codex app bug.
I traced this to a likely Windows-specific
codex-app-servercommand/execcwd-normalization issue.I prepared a narrow patch on my fork here:
Dj-Shortcut:fix/windows-gh-verbatim-cwd813e51790What it changes:
cwdvalues like\\?\C:\...before nativecommand/execstartupcwdgets rewrittenRelevant files:
codex-rs/app-server/src/codex_message_processor.rscodex-rs/app-server/src/command_exec.rsWhat I verified locally:
command/execcwd normalizationcodex-app-serverlocallyImportant limitation:
codex-app-server, but I have not proven that the desktop app’s GitHub CLI / PR warning path actually goes through this exact routeAfter spending more time with Git/GitHub, I think my original diagnosis may have been too strong.
What I can confirm:
ghis available in the app terminalgh auth statusworksWhat I can no longer confidently claim:
It now seems possible the real issue is that the GUI PR flow had nothing valid to compare / open a PR against, while the app surfaced a generic “GitHub CLI is not installed” message instead.
So the core problem may be incorrect or overly generic UI messaging, rather than actual missing CLI installation.
I'm also seeing this on MacOS
Also seeing this on macOS.
I prepared a fix here:
https://github.com/BeastNectus/codex/tree/fix/windows-command-exec-cwd-normalization
Commit:
https://github.com/BeastNectus/codex/commit/ab3715001e60f3ddffea6e4dbb5efc9623c4d2b9
Summary:
\\?\C:\...before nativecommand/execprocess startupValidation:
cargo fmt --manifest-path codex-rs\Cargo.toml --package codex-app-servercargo test --manifest-path codex-rs\Cargo.toml -p codex-app-server --lib normalize_command_exec_cwd_simplifies_windows_verbatim_pathsAlso seeing this on macOS.
Update: the PR button is working for me now.
The only local change I remember making was creating/refreshing a GitHub PAT a few days ago, but I cannot confidently reproduce the before/after state. It is possible the original “GitHub CLI is not installed” message was masking an auth/token-state problem rather than an actual missing-gh problem.
I’ll leave this note here in case it helps debugging, but I can’t currently reproduce the issue anymore.