Windows: Codex-launched PowerShell process contains duplicate Path/PATH environment keys
What version of the Codex App are you using (From “About Codex” dialog)?
26.623.141536
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex Desktop on Windows appears to launch PowerShell/tool processes with both Path and PATH in the process environment.
This does not come from the persisted Windows environment. In Windows itself, both the user and machine environment contain only Path. The duplicate only appears inside the process environment inherited by Codex-launched shell/tool processes.
Environment:
OS: Microsoft Windows 10.0.26200.8737
PowerShell: Windows PowerShell 5.1.26100.8737
Shell used by Codex tool: powershell
Node: v24.18.0
npm: 11.18.0 via npm.cmd
On Windows, Codex should normalize environment variable keys case-insensitively before launching shell/tool/background processes and pass only one canonical Path entry.
Actual behavior:
Codex-launched processes receive both Path and PATH with identical values.
Impact:
An Angular dev server can build and start in the foreground and reports http://localhost:4200/, but Codex cannot reliably keep it running as a persistent background process. The foreground process is later killed by the tool timeout.
What steps can reproduce the bug?
Run this inside a Codex shell/tool process on Windows:
[Environment]::GetEnvironmentVariables('Process').Keys | Where-Object { $_ -ieq 'Path' }
Actual output:
Path
PATH
Compare with persisted Windows environment variables:
[Environment]::GetEnvironmentVariables('User').Keys | Where-Object { $_ -ieq 'Path' }
[Environment]::GetEnvironmentVariables('Machine').Keys | Where-Object { $_ -ieq 'Path' }
Actual output for each:
Path
Another symptom:
Running this inside the Codex-launched PowerShell process:
Get-ChildItem Env:
fails with:
Get-ChildItem : Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.GetChildItemCommand
What is the expected behavior?
On Windows, Codex should normalize environment variable keys case-insensitively before launching shell/tool/background processes and pass only one canonical Path entry.
Additional information
_No response_