Bug type
Regression (worked before, now fails)
Summary
Issue Title
Windows: Runtime: unknown due to schtasks key mismatch ("Last Result" vs "Last Run Result")
Description
On Windows, openclaw gateway status shows Runtime: unknown even when the gateway is actually running correctly (RPC probe: ok).
Root Cause
In src/daemon/service.ts, the parseSchtasksQuery function expects the key last run result:
const lastRunResult = entries["last run result"];
However, actual schtasks /Query /V /FO LIST output on Windows uses Last Result (without "Run"):
Last Run Time: 2026/3/16 8:34:15
Last Result: 267009
Status: Running
This causes parsed.lastRunResult to be undefined, which leads to normalizeTaskResultCode(undefined) returning null, and finally deriveScheduledTaskRuntimeStatus returning { status: "unknown" }.
Environment
- OS: Windows 10/11
- OpenClaw version: v2026.3.8
- Node.js: v24.14.0
Steps to Reproduce
- Install OpenClaw gateway as Windows Scheduled Task
- Start the gateway:
openclaw gateway start
- Check status:
openclaw gateway status
- Observe
Runtime: unknown despite RPC probe: ok
Suggested Fix
Update parseSchtasksQuery to also check for last result (without "run") as a fallback:
const lastRunResult = entries["last run result"] ?? entries["last result"];
Steps to reproduce
Issue Title
Windows: Runtime: unknown due to schtasks key mismatch ("Last Result" vs "Last Run Result")
Description
On Windows, openclaw gateway status shows Runtime: unknown even when the gateway is actually running correctly (RPC probe: ok).
Root Cause
In src/daemon/service.ts, the parseSchtasksQuery function expects the key last run result:
const lastRunResult = entries["last run result"];
However, actual schtasks /Query /V /FO LIST output on Windows uses Last Result (without "Run"):
Last Run Time: 2026/3/16 8:34:15
Last Result: 267009
Status: Running
This causes parsed.lastRunResult to be undefined, which leads to normalizeTaskResultCode(undefined) returning null, and finally deriveScheduledTaskRuntimeStatus returning { status: "unknown" }.
Environment
- OS: Windows 10/11
- OpenClaw version: v2026.3.8
- Node.js: v24.14.0
Steps to Reproduce
- Install OpenClaw gateway as Windows Scheduled Task
- Start the gateway:
openclaw gateway start
- Check status:
openclaw gateway status
- Observe
Runtime: unknown despite RPC probe: ok
Suggested Fix
Update parseSchtasksQuery to also check for last result (without "run") as a fallback:
const lastRunResult = entries["last run result"] ?? entries["last result"];
Expected behavior
Issue Title
Windows: Runtime: unknown due to schtasks key mismatch ("Last Result" vs "Last Run Result")
Description
On Windows, openclaw gateway status shows Runtime: unknown even when the gateway is actually running correctly (RPC probe: ok).
Root Cause
In src/daemon/service.ts, the parseSchtasksQuery function expects the key last run result:
const lastRunResult = entries["last run result"];
However, actual schtasks /Query /V /FO LIST output on Windows uses Last Result (without "Run"):
Last Run Time: 2026/3/16 8:34:15
Last Result: 267009
Status: Running
This causes parsed.lastRunResult to be undefined, which leads to normalizeTaskResultCode(undefined) returning null, and finally deriveScheduledTaskRuntimeStatus returning { status: "unknown" }.
Environment
- OS: Windows 10/11
- OpenClaw version: v2026.3.8
- Node.js: v24.14.0
Steps to Reproduce
- Install OpenClaw gateway as Windows Scheduled Task
- Start the gateway:
openclaw gateway start
- Check status:
openclaw gateway status
- Observe
Runtime: unknown despite RPC probe: ok
Suggested Fix
Update parseSchtasksQuery to also check for last result (without "run") as a fallback:
const lastRunResult = entries["last run result"] ?? entries["last result"];
Actual behavior
Issue Title
Windows: Runtime: unknown due to schtasks key mismatch ("Last Result" vs "Last Run Result")
Description
On Windows, openclaw gateway status shows Runtime: unknown even when the gateway is actually running correctly (RPC probe: ok).
Root Cause
In src/daemon/service.ts, the parseSchtasksQuery function expects the key last run result:
const lastRunResult = entries["last run result"];
However, actual schtasks /Query /V /FO LIST output on Windows uses Last Result (without "Run"):
Last Run Time: 2026/3/16 8:34:15
Last Result: 267009
Status: Running
This causes parsed.lastRunResult to be undefined, which leads to normalizeTaskResultCode(undefined) returning null, and finally deriveScheduledTaskRuntimeStatus returning { status: "unknown" }.
Environment
- OS: Windows 10/11
- OpenClaw version: v2026.3.8
- Node.js: v24.14.0
Steps to Reproduce
- Install OpenClaw gateway as Windows Scheduled Task
- Start the gateway:
openclaw gateway start
- Check status:
openclaw gateway status
- Observe
Runtime: unknown despite RPC probe: ok
Suggested Fix
Update parseSchtasksQuery to also check for last result (without "run") as a fallback:
const lastRunResult = entries["last run result"] ?? entries["last result"];
OpenClaw version
2026.3.8
Operating system
Windows 11
Install method
No response
Model
KImi2.5
Provider / routing chain
Kimi2.5
Config file / key location
No response
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Bug type
Regression (worked before, now fails)
Summary
Issue Title
Windows:
Runtime: unknowndue to schtasks key mismatch ("Last Result" vs "Last Run Result")Description
On Windows,
openclaw gateway statusshowsRuntime: unknowneven when the gateway is actually running correctly (RPC probe: ok).Root Cause
In
src/daemon/service.ts, theparseSchtasksQueryfunction expects the keylast run result:However, actual
schtasks /Query /V /FO LISToutput on Windows usesLast Result(without "Run"):This causes
parsed.lastRunResultto beundefined, which leads tonormalizeTaskResultCode(undefined)returningnull, and finallyderiveScheduledTaskRuntimeStatusreturning{ status: "unknown" }.Environment
Steps to Reproduce
openclaw gateway startopenclaw gateway statusRuntime: unknowndespiteRPC probe: okSuggested Fix
Update
parseSchtasksQueryto also check forlast result(without "run") as a fallback:Steps to reproduce
Issue Title
Windows:
Runtime: unknowndue to schtasks key mismatch ("Last Result" vs "Last Run Result")Description
On Windows,
openclaw gateway statusshowsRuntime: unknowneven when the gateway is actually running correctly (RPC probe: ok).Root Cause
In
src/daemon/service.ts, theparseSchtasksQueryfunction expects the keylast run result:However, actual
schtasks /Query /V /FO LISToutput on Windows usesLast Result(without "Run"):This causes
parsed.lastRunResultto beundefined, which leads tonormalizeTaskResultCode(undefined)returningnull, and finallyderiveScheduledTaskRuntimeStatusreturning{ status: "unknown" }.Environment
Steps to Reproduce
openclaw gateway startopenclaw gateway statusRuntime: unknowndespiteRPC probe: okSuggested Fix
Update
parseSchtasksQueryto also check forlast result(without "run") as a fallback:Expected behavior
Issue Title
Windows:
Runtime: unknowndue to schtasks key mismatch ("Last Result" vs "Last Run Result")Description
On Windows,
openclaw gateway statusshowsRuntime: unknowneven when the gateway is actually running correctly (RPC probe: ok).Root Cause
In
src/daemon/service.ts, theparseSchtasksQueryfunction expects the keylast run result:However, actual
schtasks /Query /V /FO LISToutput on Windows usesLast Result(without "Run"):This causes
parsed.lastRunResultto beundefined, which leads tonormalizeTaskResultCode(undefined)returningnull, and finallyderiveScheduledTaskRuntimeStatusreturning{ status: "unknown" }.Environment
Steps to Reproduce
openclaw gateway startopenclaw gateway statusRuntime: unknowndespiteRPC probe: okSuggested Fix
Update
parseSchtasksQueryto also check forlast result(without "run") as a fallback:Actual behavior
Issue Title
Windows:
Runtime: unknowndue to schtasks key mismatch ("Last Result" vs "Last Run Result")Description
On Windows,
openclaw gateway statusshowsRuntime: unknowneven when the gateway is actually running correctly (RPC probe: ok).Root Cause
In
src/daemon/service.ts, theparseSchtasksQueryfunction expects the keylast run result:However, actual
schtasks /Query /V /FO LISToutput on Windows usesLast Result(without "Run"):This causes
parsed.lastRunResultto beundefined, which leads tonormalizeTaskResultCode(undefined)returningnull, and finallyderiveScheduledTaskRuntimeStatusreturning{ status: "unknown" }.Environment
Steps to Reproduce
openclaw gateway startopenclaw gateway statusRuntime: unknowndespiteRPC probe: okSuggested Fix
Update
parseSchtasksQueryto also check forlast result(without "run") as a fallback:OpenClaw version
2026.3.8
Operating system
Windows 11
Install method
No response
Model
KImi2.5
Provider / routing chain
Kimi2.5
Config file / key location
No response
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response