Skip to content

[Bug]: gateway restart command fails when executed via exec tool on Windows #47445

@Blickhand

Description

@Blickhand

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

  1. Run OpenClaw on Windows
  2. Execute 'openclaw gateway restart' via the exec tool (e.g., in a conversation with the agent)
  3. The command fails with timeout and port already in use error
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions