winget command line alias not added
Open 💬 3 comments Opened Jun 15, 2026 by donpellegrino
What issue are you seeing?
The Codex CLI installation via winget reports that a codex command line alias was added, but it was not.
What steps can reproduce the bug?
Install or update Codex CLI via winget:
(8/9) Found Codex CLI [OpenAI.Codex] Version 0.139.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/openai/codex/releases/download/rust-v0.139.0/codex-x86_64-pc-windows-msvc.exe.zip
██████████████████████████████ 92.8 MB / 92.8 MB
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
Command line alias added: "codex-command-runner"
Command line alias added: "codex-windows-sandbox-setup"
Command line alias added: "codex"
Successfully installed
Start a new PowerShell terminal and observe that although the update reported a command line alias was added that it is not available:
PS C:\Users\User01> codex
codex : The term 'codex' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ codex
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (codex:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Use tab completion to discover the available command:
PS C:\Users\User01> codex-x86_64-pc-windows-msvc.exe
What is the expected behavior?
The expected behavior is that the alias that was reported as setup be setup.
Additional information
_No response_
3 Comments
The winget installer reports "Command line alias added: 'codex'" but after installation the
codexcommand is not found because the zip containscodex-x86_64-pc-windows-msvc.exeinstead ofcodex.exe.The helper binaries (codex-command-runner, codex-windows-sandbox-setup) were already correctly renamed inside the zip, but the main binary retained the target-triple name.
This change renames it to
codex.exeso the winget alias resolves correctly.Closes #28321
Fix branch: https://github.com/jieshu666/codex/tree/fix/winget-codex-alias
Change in
.github/workflows/rust-release-windows.yml(2 hunks, +4/-2):cp "$dest/$base" "$bundle_dir/$base"→cp "$dest/$base" "$bundle_dir/codex.exe"codex.exebefore zippingThe helper binaries were already correctly renamed to short names inside the zip; this just aligns the main binary.
@jieshu666 Are you submitting a PR?