Summary
On Windows, the OpenClaw scheduled task OpenClaw Gateway (created at install time and bound to LogonTrigger) runs gateway.cmd directly. Because the action is cmd.exe → node.exe, a visible cmd.exe console window appears on the desktop on every launch — at logon, after watchdog-driven recovery, after manual schtasks /run, etc.
Setting Settings.Hidden = True on the task does not fix this. That flag only hides the task entry from the Task Scheduler MMC list; it does NOT suppress the console window of cmd.exe started by the action.
Repro
- Install OpenClaw on Windows 11 (verified on build 10.0.26200).
- Confirm the
OpenClaw Gateway scheduled task action is gateway.cmd (the installer default).
- Stop the running gateway:
Stop-Process -Name node -Force
- Watchdog (or LogonTrigger after a reboot) relaunches the task → a
cmd.exe window visibly appears on the desktop.
Expected
Background launch is invisible. The gateway is a service-class background process — it should never produce a visible console window on user-driven restart, logon trigger, or watchdog-driven recovery.
Actual
A cmd.exe window pops up on every relaunch. Users either mentally filter it or accidentally close it (which kills the gateway, as I just did).
Workaround
Wrap gateway.cmd in a windowless launcher and point the task at that instead:
' run-gateway-hidden.vbs
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd.exe /c ""C:\Users\<user>\.openclaw\gateway.cmd""", 0, False
Then set the task action to:
wscript.exe "C:\Users\<user>\.openclaw\run-gateway-hidden.vbs"
wscript.exe is windowless by design (canonical Windows pattern for truly-hidden launches). After applying this and a clean recycle, no console appears on any future launch path. Verified locally.
Suggested fix
The installer's Windows scheduled-task creation step should either ship a VBS/JS launcher (small, no deps), use SW_HIDE/START /B semantics, or compile a tiny windowless .exe wrapper. Pointing the task action at gateway.cmd directly is the root cause.
Related
Environment
- Windows 11 Pro 10.0.26200
- OpenClaw 2026.5.28
- node v24.11.1
Summary
On Windows, the OpenClaw scheduled task
OpenClaw Gateway(created at install time and bound to LogonTrigger) runsgateway.cmddirectly. Because the action iscmd.exe → node.exe, a visiblecmd.execonsole window appears on the desktop on every launch — at logon, after watchdog-driven recovery, after manualschtasks /run, etc.Setting
Settings.Hidden = Trueon the task does not fix this. That flag only hides the task entry from the Task Scheduler MMC list; it does NOT suppress the console window of cmd.exe started by the action.Repro
OpenClaw Gatewayscheduled task action isgateway.cmd(the installer default).Stop-Process -Name node -Forcecmd.exewindow visibly appears on the desktop.Expected
Background launch is invisible. The gateway is a service-class background process — it should never produce a visible console window on user-driven restart, logon trigger, or watchdog-driven recovery.
Actual
A
cmd.exewindow pops up on every relaunch. Users either mentally filter it or accidentally close it (which kills the gateway, as I just did).Workaround
Wrap
gateway.cmdin a windowless launcher and point the task at that instead:Then set the task action to:
wscript.exeis windowless by design (canonical Windows pattern for truly-hidden launches). After applying this and a clean recycle, no console appears on any future launch path. Verified locally.Suggested fix
The installer's Windows scheduled-task creation step should either ship a VBS/JS launcher (small, no deps), use
SW_HIDE/START /Bsemantics, or compile a tiny windowless.exewrapper. Pointing the task action atgateway.cmddirectly is the root cause.Related
findstr /I /C:"Running"stays visible) — same class of bug in a different code path; suggests a generalized "windowless cmd helper" abstraction in the Windows host code would fix both.Environment