openclaw - ✅(Solved) Fix [Bug]: OpenClaw CLI commands remain alive as node.exe processes after execution on Windows [1 pull requests, 3 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#74378Fetched 2026-04-30 06:24:40
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
2
Author
Timeline (top)
commented ×3labeled ×2cross-referenced ×1subscribed ×1

OpenClaw CLI commands such as version and status remain alive as node.exe ... openclaw.mjs <command> processes after execution on Windows.

Error Message

CLI commands should terminate after completing or after returning an error. CLI commands should terminate after completing or after returning an error.

Root Cause

OpenClaw CLI commands such as version and status remain alive as node.exe ... openclaw.mjs <command> processes after execution on Windows.

Fix Action

Fixed

PR fix notes

PR #74425: fix: ensure CLI processes exit after command completion on Windows

Description (problem / solution / changelog)

Summary

Fixes CLI processes (node.exe openclaw.mjs) remaining alive after command execution on Windows. The CLI entrypoint was missing process.exit() calls after commands completed, causing processes to hang.

Changes

  • Added explicit process.exit(process.exitCode ?? 0) call after CLI entrypoint execution in openclaw.mjs
  • Ensures all async code paths properly terminate on Windows

Testing

  • Verified CLI commands now exit cleanly on Windows after completion
  • Existing test suite passes

Fixes openclaw/openclaw#74378

Changed files

  • openclaw.mjs (modified, +4/-0)

Code Example

curl http://127.0.0.1:18789/health

{"ok":true,"status":"live"}

node "C:\Users\k\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs" version

3. Run the CLI entrypoint directly:
node "C:\Users\k\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs" version
4. Observe the process after 3 seconds and 13 seconds.
5. Repeat with:
node "C:\Users\k\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs" status

6. Observe the process after 3 seconds and 13 seconds.
**Expected behavior**

---

CLI commands should terminate after completing or after returning an error.

### Actual behavior

`openclaw.mjs version` remained alive after 3 seconds and 13 seconds.

Observed process:

PID 22300 node.exe ... openclaw.mjs version

Observed memory:

After 3s: WorkingSet ~406MB
After 13s: WorkingSet ~459MB
Before cleanup: WorkingSet ~581MB

`openclaw.mjs status` also remained alive after 3 seconds and 13 seconds.

Observed process:

PID 26840 node.exe ... openclaw.mjs status

Observed memory:

After 3s: WorkingSet ~369MB
After 13s: WorkingSet ~454MB
Before cleanup: WorkingSet ~457MB

The gateway process was separate and remained healthy:

PID 20356 node.exe ... openclaw dist/index.js gateway --port 18789

Only the stuck CLI processes were manually stopped.

### OpenClaw version

OpenClaw 2026.4.26 

### Operating system

Windows11

### Install method

npm

### Model

cliproxyapi/Codex GPT5.5

### Provider / routing chain

OpenClaw -> CLIProxyAPI -> Codex GPT5.5

### Additional provider/model setup details

Health checks observed as OK:

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

OpenClaw CLI commands such as version and status remain alive as node.exe ... openclaw.mjs <command> processes after execution on Windows.

Steps to reproduce

  1. Run OpenClaw 2026.4.26 on Windows.

  2. Confirm the gateway is healthy:

    curl http://127.0.0.1:18789/health

{"ok":true,"status":"live"}

node "C:\Users\k\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs" version

  1. Run the CLI entrypoint directly: node "C:\Users\k\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs" version

  2. Observe the process after 3 seconds and 13 seconds.

  3. Repeat with: node "C:\Users\k\AppData\Roaming\npm\node_modules\openclaw\openclaw.mjs" status

  4. Observe the process after 3 seconds and 13 seconds. Expected behavior

CLI commands should terminate after completing or after returning an error.

### Expected behavior

**Expected behavior**

```txt
CLI commands should terminate after completing or after returning an error.

### Actual behavior

`openclaw.mjs version` remained alive after 3 seconds and 13 seconds.

Observed process:

PID 22300 node.exe ... openclaw.mjs version

Observed memory:

After 3s: WorkingSet ~406MB
After 13s: WorkingSet ~459MB
Before cleanup: WorkingSet ~581MB

`openclaw.mjs status` also remained alive after 3 seconds and 13 seconds.

Observed process:

PID 26840 node.exe ... openclaw.mjs status

Observed memory:

After 3s: WorkingSet ~369MB
After 13s: WorkingSet ~454MB
Before cleanup: WorkingSet ~457MB

The gateway process was separate and remained healthy:

PID 20356 node.exe ... openclaw dist/index.js gateway --port 18789

Only the stuck CLI processes were manually stopped.

### OpenClaw version

OpenClaw 2026.4.26 

### Operating system

Windows11

### Install method

npm

### Model

cliproxyapi/Codex GPT5.5

### Provider / routing chain

OpenClaw -> CLIProxyAPI -> Codex GPT5.5

### Additional provider/model setup details

Health checks observed as OK:

```powershell
openclaw --version

### Logs, screenshots, and evidence

```shell

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The OpenClaw CLI commands may not be properly terminating due to an issue with the Node.js process, causing it to remain alive after execution.

Guidance

  • Verify that the openclaw.mjs script is properly handling process exit codes and errors, as this could be causing the Node.js process to remain active.
  • Check for any asynchronous operations or timers that may be preventing the process from terminating.
  • Investigate the memory usage of the process to determine if there is a memory leak or other issue causing the process to remain alive.
  • Consider adding a timeout or exit handler to the openclaw.mjs script to ensure it terminates after a certain period of time.

Example

No code example is provided as the issue is likely related to the specific implementation of the openclaw.mjs script.

Notes

The issue appears to be specific to the Windows operating system and OpenClaw version 2026.4.26. Further investigation is needed to determine the root cause of the issue.

Recommendation

Apply a workaround, such as adding a timeout or exit handler to the openclaw.mjs script, to ensure the process terminates after execution. This will help mitigate the issue until a permanent fix can be implemented.

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

Expected behavior

CLI commands should terminate after completing or after returning an error.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: OpenClaw CLI commands remain alive as node.exe processes after execution on Windows [1 pull requests, 3 comments, 2 participants]