Skip to content

[Bug]: Windows native CLI gateway Scheduled Task does not stay running; foreground window worksWindows native CLI gateway Scheduled Task does not stay running; foreground window works #91144

Description

@Hugues-Le-Roy

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

OpenClaw version: 2026.5.20 (e510042)
Platform: Windows native CLI / PowerShell

What works:

  • Running openclaw gateway in a foreground PowerShell window works.

  • Slack connects and responds while that window is open.

What fails:

  • openclaw gateway install/start/restart registers a Scheduled Task, but the gateway does not keep running after the foreground gateway window is closed.
  • openclaw gateway status --deep later shows:

Runtime: unknown
Connectivity probe: failed
connect ECONNREFUSED 127.0.0.1:18789

At one point status also showed:

Runtime: running (... Verified gateway listener detected on port 18789 even though schtasks did not report a running task.)
Connectivity probe: ok

Expected:

  • The Windows Scheduled Task should keep the gateway running without a visible PowerShell/gateway window.

Steps to reproduce

OpenClaw version: 2026.5.20 (e510042)
Platform: Windows native CLI / PowerShell

What works:

  • Running openclaw gateway in a foreground PowerShell window works.

  • Slack connects and responds while that window is open.

What fails:

  • openclaw gateway install/start/restart registers a Scheduled Task, but the gateway does not keep running after the foreground gateway window is closed.
  • openclaw gateway status --deep later shows:

Runtime: unknown
Connectivity probe: failed
connect ECONNREFUSED 127.0.0.1:18789

At one point status also showed:

Runtime: running (... Verified gateway listener detected on port 18789 even though schtasks did not report a running task.)
Connectivity probe: ok

Expected:

  • The Windows Scheduled Task should keep the gateway running without a visible PowerShell/gateway window.

Expected behavior

Expected:

  • The Windows Scheduled Task should keep the gateway running without a visible PowerShell/gateway window.

Actual behavior

OpenClaw version: 2026.5.20 (e510042)
Platform: Windows native CLI / PowerShell

What works:

  • Running openclaw gateway in a foreground PowerShell window works.
  • Slack connects and responds while that window is open.

What fails:

  • openclaw gateway install/start/restart registers a Scheduled Task, but the gateway does not keep running after the foreground gateway window is closed.
  • openclaw gateway status --deep later shows:

Runtime: unknown
Connectivity probe: failed
connect ECONNREFUSED 127.0.0.1:18789

At one point status also showed:

Runtime: running (... Verified gateway listener detected on port 18789 even though schtasks did not report a running task.)
Connectivity probe: ok

OpenClaw version

OpenClaw version: 2026.5.20 (e510042)

Operating system

Platform: Windows native CLI / PowerShell

Install method

No response

Model

openrouter/openrouter/free

Provider / routing chain

OpenClaw -> OpenRouter

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions