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
Codex crashes on startup on Windows when WSL is enabled but no distro is installed #16169
I was able to resolve this on Windows by repairing/reinstalling the Microsoft Visual C++ Redistributable packages.
Although the crash initially looked related to WSL detection, the actual root cause on my machine was a broken/conflicting VC++ runtime installation. After reinstalling the VC++ redistributables, Codex started normally.
What fixed it
Uninstall existing Microsoft Visual C++ 2015-2022 Redistributable packages:
x64
x86
Reboot Windows.
Reinstall the latest official packages from Microsoft:
x64
x86
Launch Codex again.
Notes
In my case, the installer previously returned an error consistent with an existing/conflicting VC++ installation.
After repairing the VC++ runtime, Codex no longer crashed on startup.
So while WSL/no-distro state may still be worth investigating, the immediate startup crash with code=3221225781 on this machine was resolved by fixing the VC++ runtime.
Suggested improvement for Codex
It would still be helpful if Codex could:
detect missing/broken runtime dependencies more clearly,
avoid crashing with a generic code=3221225781,
and show a more actionable startup error message.
Reacted by Hu_Z, John Happy, 0x9579, kings1990 and haandol
Activity
github-actions commentedon Mar 29, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
1529119384 commentedon Mar 29, 2026
1529119384 commentedon Mar 29, 2026
Resolution
I was able to resolve this on Windows by repairing/reinstalling the Microsoft Visual C++ Redistributable packages.
Although the crash initially looked related to WSL detection, the actual root cause on my machine was a broken/conflicting VC++ runtime installation. After reinstalling the VC++ redistributables, Codex started normally.
What fixed it
Uninstall existing Microsoft Visual C++ 2015-2022 Redistributable packages:
Reboot Windows.
Reinstall the latest official packages from Microsoft:
Launch Codex again.
Notes
code=3221225781on this machine was resolved by fixing the VC++ runtime.Suggested improvement for Codex
It would still be helpful if Codex could:
code=3221225781,quhy commentedon Mar 30, 2026
Thank you. I fixed the issue by following your method
zichen526 commentedon May 1, 2026
我重新安装了这两个插件还是不行