Windows native: node run hangs after printing PATH, or the runtime stays unstable
Stabilize native Windows setups where `openclaw node run` hangs after PATH output, the runtime behaves differently from your shell, or your real requirement is better served by WSL2.
Symptoms
openclaw node runprints a line likenode host PATH: ...and then appears to hang.- Native Windows behavior differs from what works in your normal shell.
- You expected a true background-service model, but the built-in Windows daemon path behaves more like a desktop-session task.
- You are on a localized Windows install, a non-ASCII profile path, or a Node/npm path under
C:\Program Files\...and native behavior feels fragile.
Cause
This class of problem is usually not just one missing PATH entry.
It tends to be a native Windows runtime mismatch involving one or more of these:
--ignore-scriptsor another half-install path,- node-host startup on native Windows,
- assumptions that a Scheduled Task behaves like a true Windows Service / Session 0 process,
- localized Windows output,
- path quoting or non-ASCII path edge cases.
Fix
1) Reduce variables before debugging deeper
Use the boring baseline:
npm uninstall -g openclaw
npm install -g openclaw@latest
openclaw --version
openclaw doctor
Do not keep testing on a --ignore-scripts install.
2) Confirm the gateway and node host are launched from comparable environments
If you are testing node-host behavior, do not mix shells casually.
At minimum, confirm:
openclaw gateway status
node -v
where openclaw
If possible, start both from the same fresh shell while reducing other changes.
3) Decide whether you really need native Windows for this setup
If your real requirement is:
- a more Linux-like service model,
- fewer PATH and locale surprises,
- or predictable external CLI behavior,
then WSL2 is usually the right fix, not more native-Windows tweaking.
Start here:
4) Move stubborn native setups to WSL2 earlier, not later
If you are on Windows 11 24H2, a localized OS, a non-ASCII home path, or a path-with-spaces-heavy setup, use WSL2 as the control path before spending more time on native Windows.
5) If you stay native, keep the gateway foreground during stabilization
openclaw gateway run --port 18789
That gives you a simpler control path before layering on Scheduled Task behavior again.
Verify
openclaw node runno longer stalls after the PATH line, or- the same workflow is stable in WSL2, proving the remaining issue was native Windows-specific.