openclaw - 💡(How to fix) Fix [Bug][Windows] openclaw gateway restart --force does not auto-restart on Windows (schtasks) [1 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#81485Fetched 2026-05-14 03:31:35
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
closed ×1commented ×1

Root Cause

The --force flag sends SIGTERM to stop the process, but on Windows the schtasks service does not have an auto-restart mechanism triggered by this. The automatic restart behavior described in the docs (using launchd/systemd auto-restart) applies to macOS/Linux but not to Windows.

Fix Action

Fix / Workaround

  1. openclaw gateway restart --force is executed
  2. The Gateway process is terminated (SIGTERM)
  3. Gateway stays stopped — no automatic restart occurs
  4. User must manually run openclaw gateway run or use a workaround script
RAW_BUFFERClick to expand / collapse

Bug Description

On Windows, openclaw gateway restart --force sends SIGTERM to stop the Gateway process but does not automatically restart it afterward.

Environment

  • OpenClaw version: 2026.5.12-beta.4
  • OS: Windows
  • Installation: npm package install
  • Gateway managed by: schtasks (Windows Scheduled Task)

Expected Behavior

After openclaw gateway restart --force completes, the Gateway should be automatically restarted and running.

Actual Behavior

  1. openclaw gateway restart --force is executed
  2. The Gateway process is terminated (SIGTERM)
  3. Gateway stays stopped — no automatic restart occurs
  4. User must manually run openclaw gateway run or use a workaround script

Root Cause

The --force flag sends SIGTERM to stop the process, but on Windows the schtasks service does not have an auto-restart mechanism triggered by this. The automatic restart behavior described in the docs (using launchd/systemd auto-restart) applies to macOS/Linux but not to Windows.

Documentation Reference

From docs: "monitoring: use launchd/systemd auto-restart" — this mechanism only works on macOS (launchd) and Linux (systemd), not Windows (schtasks).

Suggested Fix

Either:

  1. Add Windows schtasks auto-restart support for --force restart
  2. Or document that --force requires manual restart on Windows
  3. Or add a Windows-specific fallback that automatically calls openclaw gateway run after SIGTERM on Windows

Steps to Reproduce

  1. Run openclaw gateway run to start Gateway
  2. In another terminal, run openclaw gateway restart --force
  3. Observe that the Gateway process is stopped and does not restart automatically

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…

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 - 💡(How to fix) Fix [Bug][Windows] openclaw gateway restart --force does not auto-restart on Windows (schtasks) [1 comments, 2 participants]