ERROR codex_core::tools::router: error=Exit code: -1073741502

Open 💬 1 comment Opened Apr 14, 2026 by sgotsko

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 like dir, pwd, git status, or cmd /c dir exited immediately with code -1073741502 and 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?

  1. Set up a Windows machine with Codex version above 0.46.0
  2. Connect via SSH (any SSH client)
  3. Navigate to a trusted project directory with workspace-write and trust_level = "trusted" in config
  4. Run codex and ask anything that would require executing commands in the workdir, like "what's in this directory"
  5. 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

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗