ERROR codex_core::tools::router: error=Exit code: -1073741502
What version of Codex CLI is running?
0.120.0
What subscription do you have?
ChatGPT Business
Which model were you using?
gpt-5.4-mini
What platform is your computer?
Microsoft Windows NT 10.0.19043.0 x64
What terminal emulator and version are you using (if applicable)?
PowerShell
What issue are you seeing?
The issue appears when executing Codex in SSH session, like through Jenkins or just SSH into machine and running codex in unelevated sandbox.
Codex response to any prompt that would require reading files from working directory:
I couldn’t analyze the current directory because command execution is failing at the environment level. Every attempt to run even minimal commands likedir,pwd,git status, orcmd /c direxited immediately with code-1073741502and no output."
The log file would have this line: ERROR codex_core::tools::router: error=Exit code: -1073741502
Investigatin this further it appears to be 0xC0000142 which is STATUS_DLL_INIT_FAILED
When running codex interactively it would ask to run commands with elevated permissions this is no go for me as I'm trying to wrap up everything in script.
--yolo does fix this issue but I have a security concerns with this method
config.toml
model = "gpt-5.4"
[projects.'C:\jenkins\workspace\MyProject']
trust_level = "trusted"
[windows]
sandbox = "unelevated"
The issue is specific to SSH session, when running it on the actural machine under same user it works fine.
I've compared the environments and haven't spotted anything that would point out to the issue.
Last known working version is 0.46.0
What steps can reproduce the bug?
- Set up a Windows machine with Codex version above 0.46.0
- Connect via SSH (any SSH client)
- Navigate to a trusted project directory with workspace-write and trust_level = "trusted" in config
- Run codex and ask anything that would require executing commands in the workdir, like "what's in this directory"
- Observe Exit code: -1073741502 and escalation request
What is the expected behavior?
Unelevated sandbox should be able to spawn shell processes in SSH sessions
Additional information
- Last known working version is 0.46.0
- Removing .codex folder didn't help
- Tried to downgrade version by version down to 0.115.0
- Result same for interactive and codex exec variants of running codex
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗