# Resolving Windows `.cmd` shims past cmd.exe Node refuses to spawn a `.cmd`/`.bat` target without a shell (the CVE-2024-27980 mitigation), so `resolveSpawn` has to make `cmd.exe` the program and hand it `/d /v:off /s /c ""`. For an agent CLI that means a long `cmd.exe /c` line whose caret-escaped payload is natural-language prompt text — which Microsoft Defender for Endpoint's command-line model scores as obfuscation. `codex.cmd` appeared in the spawn cluster of an MDE incident against Orca for exactly this reason. `src/shared/child-process/windows-cmd-shim-resolution.ts` sidesteps it. npm's `cmd-shim` and pnpm's `@zkochan/cmd-shim` generate files whose entire body is "find a Node interpreter and run this script". Reading one lets `resolveSpawn` spawn `node.exe