openclaw - 💡(How to fix) Fix [Bug]: Windows 2026.5.22 gateway install writes gateway.cmd as self-recursive wrapper

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

On Windows with OpenClaw 2026.5.22 (a374c3a), the gateway install/update flow generated C:\Users\<user>\.openclaw\gateway.cmd so that the final command called the wrapper itself:

C:\Users\<user>\.openclaw\gateway.cmd gateway --port 18789

This makes the wrapper recursively invoke itself instead of launching the OpenClaw gateway entrypoint directly:

"C:\Program Files\nodejs\node.exe" "C:\Users\<user>\AppData\Roaming\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

The result is confusing: a gateway process may appear to start, but the configured gateway port never becomes healthy, so install/update/doctor can appear stuck waiting for gateway health.

Root Cause

On Windows with OpenClaw 2026.5.22 (a374c3a), the gateway install/update flow generated C:\Users\<user>\.openclaw\gateway.cmd so that the final command called the wrapper itself:

C:\Users\<user>\.openclaw\gateway.cmd gateway --port 18789

This makes the wrapper recursively invoke itself instead of launching the OpenClaw gateway entrypoint directly:

"C:\Program Files\nodejs\node.exe" "C:\Users\<user>\AppData\Roaming\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

The result is confusing: a gateway process may appear to start, but the configured gateway port never becomes healthy, so install/update/doctor can appear stuck waiting for gateway health.

Fix Action

Workaround

Manually edit C:\Users\<user>\.openclaw\gateway.cmd so the final line directly invokes Node and the installed OpenClaw dist\index.js gateway entrypoint.

After replacing the recursive line with the direct Node invocation, openclaw gateway status reports:

  • CLI version: 2026.5.22
  • Gateway version: 2026.5.22
  • Runtime: running
  • Connectivity probe: ok
  • Listening: 127.0.0.1:18789

Code Example

C:\Users\<user>\.openclaw\gateway.cmd gateway --port 18789

---

"C:\Program Files\nodejs\node.exe" "C:\Users\<user>\AppData\Roaming\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

---

"C:\Program Files\nodejs\node.exe" "C:\Users\<user>\AppData\Roaming\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

---

C:\Users\<user>\.openclaw\gateway.cmd gateway --port 18789
RAW_BUFFERClick to expand / collapse

[Bug]: Windows 2026.5.22 gateway install writes gateway.cmd as self-recursive wrapper

Summary

On Windows with OpenClaw 2026.5.22 (a374c3a), the gateway install/update flow generated C:\Users\<user>\.openclaw\gateway.cmd so that the final command called the wrapper itself:

C:\Users\<user>\.openclaw\gateway.cmd gateway --port 18789

This makes the wrapper recursively invoke itself instead of launching the OpenClaw gateway entrypoint directly:

"C:\Program Files\nodejs\node.exe" "C:\Users\<user>\AppData\Roaming\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

The result is confusing: a gateway process may appear to start, but the configured gateway port never becomes healthy, so install/update/doctor can appear stuck waiting for gateway health.

Environment

  • OS: Windows
  • Shell: PowerShell
  • Install method: npm global / OpenClaw update
  • OpenClaw: 2026.5.22 (a374c3a)
  • Gateway port: 18789
  • Gateway service mode: Windows Scheduled Task / Startup-folder login item

Steps to reproduce

  1. Upgrade/install OpenClaw 2026.5.22.
  2. Run the gateway install/update flow.
  3. Inspect C:\Users\<user>\.openclaw\gateway.cmd.
  4. Observe that the generated wrapper invokes gateway.cmd itself instead of node ...\dist\index.js gateway --port 18789.
  5. Start/restart the gateway and check health/status.

Expected behavior

gateway.cmd should be a stable wrapper that launches the OpenClaw CLI entrypoint directly, for example:

"C:\Program Files\nodejs\node.exe" "C:\Users\<user>\AppData\Roaming\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

It should not call gateway.cmd recursively.

Actual behavior

The generated wrapper called itself:

C:\Users\<user>\.openclaw\gateway.cmd gateway --port 18789

This caused gateway startup/health checks to hang or remain unhealthy.

Workaround

Manually edit C:\Users\<user>\.openclaw\gateway.cmd so the final line directly invokes Node and the installed OpenClaw dist\index.js gateway entrypoint.

After replacing the recursive line with the direct Node invocation, openclaw gateway status reports:

  • CLI version: 2026.5.22
  • Gateway version: 2026.5.22
  • Runtime: running
  • Connectivity probe: ok
  • Listening: 127.0.0.1:18789

Additional related issue

openclaw doctor / openclaw doctor --non-interactive also appears to hang on this host after printing config warnings. That may be a separate 2026.5.22 issue, but it made the failed update/install harder to diagnose.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

gateway.cmd should be a stable wrapper that launches the OpenClaw CLI entrypoint directly, for example:

"C:\Program Files\nodejs\node.exe" "C:\Users\<user>\AppData\Roaming\npm\node_modules\openclaw\dist\index.js" gateway --port 18789

It should not call gateway.cmd recursively.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING