Bug
The /restart\ Telegram (and other channel) command fails on Windows because \ riggerOpenClawRestart()\ does not implement Windows scheduled task restart.
Expected behavior
/restart\ should restart the gateway on Windows via \schtasks /End\ + \schtasks /Run, similar to how \openclaw gateway restart\ (CLI) works through
estartScheduledTask().
Actual behavior
\ riggerOpenClawRestart()\ only handles:
- macOS: \launchctl kickstart -k\
- Linux: \systemctl restart\
- Windows: returns { ok: false, method: 'supervisor', detail: 'unsupported platform restart' }\
The gateway process gets stopped (via SIGUSR1 or the in-process path), but never restarted on Windows.
Relevant code
In \handleRestartCommand, when no SIGUSR1 listener is present, it calls \ riggerOpenClawRestart()\ as fallback.
\ riggerOpenClawRestart():
\\js
if (process.platform !== 'darwin') {
if (process.platform === 'linux') {
// systemctl restart ... (implemented)
}
// Windows falls through here:
return { ok: false, method: 'supervisor', detail: 'unsupported platform restart' };
}
// macOS launchctl (implemented)
\\
Meanwhile,
estartScheduledTask()\ in \src/daemon/schtasks.ts\ already has the correct Windows implementation:
\\js
async function restartScheduledTask({ stdout, env }) {
const taskName = resolveTaskName(env);
await execSchtasks(['/End', '/TN', taskName]);
const res = await execSchtasks(['/Run', '/TN', taskName]);
// ...
}
\\
Suggested fix
Add a \win32\ branch in \ riggerOpenClawRestart()\ that calls \schtasks /End\ + \schtasks /Run\ (or reuses
estartScheduledTask\ logic).
Workaround
Use \openclaw gateway restart\ from CLI instead of /restart\ in chat.
Environment
- OS: Windows 10 (10.0.26100)
- OpenClaw: latest (npm)
- Channel: Telegram
Bug
The /restart\ Telegram (and other channel) command fails on Windows because \ riggerOpenClawRestart()\ does not implement Windows scheduled task restart.
Expected behavior
/restart\ should restart the gateway on Windows via \schtasks /End\ + \schtasks /Run, similar to how \openclaw gateway restart\ (CLI) works through
estartScheduledTask().
Actual behavior
\ riggerOpenClawRestart()\ only handles:
The gateway process gets stopped (via SIGUSR1 or the in-process path), but never restarted on Windows.
Relevant code
In \handleRestartCommand, when no SIGUSR1 listener is present, it calls \ riggerOpenClawRestart()\ as fallback.
\ riggerOpenClawRestart():
\\js
if (process.platform !== 'darwin') {
if (process.platform === 'linux') {
// systemctl restart ... (implemented)
}
// Windows falls through here:
return { ok: false, method: 'supervisor', detail: 'unsupported platform restart' };
}
// macOS launchctl (implemented)
\\
Meanwhile,
estartScheduledTask()\ in \src/daemon/schtasks.ts\ already has the correct Windows implementation:
\\js
async function restartScheduledTask({ stdout, env }) {
const taskName = resolveTaskName(env);
await execSchtasks(['/End', '/TN', taskName]);
const res = await execSchtasks(['/Run', '/TN', taskName]);
// ...
}
\\
Suggested fix
Add a \win32\ branch in \ riggerOpenClawRestart()\ that calls \schtasks /End\ + \schtasks /Run\ (or reuses
estartScheduledTask\ logic).
Workaround
Use \openclaw gateway restart\ from CLI instead of /restart\ in chat.
Environment