[Q]Does Codex startup time depend on WSL 2 status?

Resolved 💬 2 comments Opened Sep 18, 2025 by tzengshinfu Closed Nov 11, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

Windows 11 24H2
Codex v0.38.0
Node.js v22.19.0
WSL 2.6.1.0
Only using Codex in Command Prompt
Default directory: %USERPROFILE%
.wslconfig

[wsl2]
networkingMode=Mirrored
[experimental]
hostAddressLoopback=true
sparseVhd=true
autoMemoryReclaim=Gradual

After freshly installing Codex, I encountered a startup delay issue.
It freezes on this screen for about 20 seconds before I can enter any commands or prompts.
<img width="485" height="139" alt="Image" src="https://github.com/user-attachments/assets/112f33be-b8b1-4cd3-9c5a-55109af55b3c" />

When I later installed Codex on another Windows 10 machine, there was no delay at all.
That’s when I realized Codex should normally start up very quickly.
The only difference was that WSL 2 had been removed from that machine.

Since I haven’t used WSL 2 for a long time after switching tech stacks, I tried running wsl --shutdown.
(PS: At that time, if I run Codex simultaneously, it also becomes unresponsive.
Running WSL afterward shows the error Wsl/Service/E_UNEXPECTED.
I have to run wsl --shutdown again before WSL 2 works normally.)

With Codex, the first launch is delayed,
but the second and subsequent launches are normal—
until the delay eventually returns.

I then tried keeping a separate terminal window open with WSL 2 logged in.
(Not sure if this is related to the WSL 2 settings, so I included them above.)
So far, Codex startup has been very fast again.

If the problem persists, I may have to uninstall WSL 2 altogether.

View original on GitHub ↗

2 Comments

xplode145-hue · 10 months ago

i am running in to something similar, on windows 10 after upgrading to wsl 2.6.1. CODEX starts up, i can use / commands but no results - codex doesn't respond at all.

WSL version: 2.6.1.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.66
MSRDC version: 1.2.6353
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.6584

etraut-openai contributor · 9 months ago

We've made many improvements to the codex CLI for WSL over the past month, so this bug is likely no longer relevant. I'm going to close it. If you're still seeing this behavior with the latest version of codex, let us know.