-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug]: gateway restart command fails when executed via exec tool on Windows #47445
Description
Bug type
Regression (worked before, now fails)
Summary
When executing 'openclaw gateway restart' via the exec tool on Windows, the command fails with 'Port 18789 is already in use' error. The gateway does not restart successfully and requires manual restart via PowerShell.
Steps to reproduce
- Run OpenClaw on Windows
- Execute 'openclaw gateway restart' via the exec tool (e.g., in a conversation with the agent)
- The command fails with timeout and port already in use error
- The gateway remains down and requires manual restart via PowerShell
Expected behavior
The gateway should restart successfully, stopping the old process and starting a new one on port 18789.
Actual behavior
The restart command fails with error: 'Found stale gateway process(es): XXXX. Stopping stale process(es) and retrying restart... Timed out after 60s waiting for gateway port 18789 to become healthy. Port 18789 is already in use.' The gateway remains down and requires manual restart.
OpenClaw version
latest (2026-03-15)
Operating system
Windows 11
Install method
No response
Model
minimax-portal/MiniMax-M2.5
Provider / routing chain
N/A - this is a CLI/gateway issue, not related to model providers
Config file / key location
No response
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Affected: Users running OpenClaw on Windows who use the exec tool to restart the gateway
Severity: Medium (blocks automated gateway restarts)
Frequency: Always reproducible when using exec tool
Consequence: Gateway requires manual restart via PowerShell, automated workflows fail
Additional information
No response