You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows native mode fails with "batch file arguments are invalid" when pwsh resolves to a .cmd shim #14264
WSL & TerminalappIssues related to the Codex desktop appbugSomething isn't workingterminalIssues related to the in-app terminalwindows-osIssues related to Codex on Windows systems
I am running into the same issue. I have pwsh.cmd however I use this start config: "C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NonInteractive -NoProfileLoadTime
I also use tty: false.
All of these together let me remove the artificial line breaks and ANSI color codes that mess up the formatting of my scripts and act as noise. In the CLI I was able to get around this by calling my pwsh.cmd first, then calling codex. But now that I want to use the app there doesn't seem to be a simple workaround. I am also getting Failed to create unified exec process: batch file arguments are invalid when codex tries exec_command.
Is there any chance we can get support for launch scripts in addition to the executables?
Expected behavior: trivial commands should execute and return output, regardless of login mode or permission profile.
In the same task, Node REPL and a delegated subagent shell still work. This suggests the failure is isolated to the parent Desktop shell_command bridge rather than a general inability to execute commands on the host. login:false does not change the result.
Temporary workaround: use the delegated subagent shell or Node REPL. I could not verify local PowerShell PATH resolution because the failing bridge prevents that check.
WSL & TerminalappIssues related to the Codex desktop appbugSomething isn't workingterminalIssues related to the in-app terminalwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Mar 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
CircuitCM commentedon Mar 13, 2026
I am running into the same issue. I have pwsh.cmd however I use this start config:
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NonInteractive -NoProfileLoadTimeI also use tty: false.
All of these together let me remove the artificial line breaks and ANSI color codes that mess up the formatting of my scripts and act as noise. In the CLI I was able to get around this by calling my pwsh.cmd first, then calling codex. But now that I want to use the app there doesn't seem to be a simple workaround. I am also getting
Failed to create unified exec process: batch file arguments are invalidwhen codex tries exec_command.Is there any chance we can get support for launch scripts in addition to the executables?

PatrickSys commentedon Aug 9, 2026
Confirming a current Windows Codex Desktop reproduction of the same pre-execution failure.
Environment:
Reproduction matrix:
functions.shell_commandcallGet-Locationpwd, withlogin:falsegit status --shortshell_commandcallsActual error:
Expected behavior: trivial commands should execute and return output, regardless of login mode or permission profile.
In the same task, Node REPL and a delegated subagent shell still work. This suggests the failure is isolated to the parent Desktop
shell_commandbridge rather than a general inability to execute commands on the host.login:falsedoes not change the result.Temporary workaround: use the delegated subagent shell or Node REPL. I could not verify local PowerShell PATH resolution because the failing bridge prevents that check.