fix(daemon): use exit code instead of localized text for schtasks fallback#85347
Conversation
…lback
Problem:
- shouldFallbackToStartupEntry() only matched English/Spanish error messages
("access is denied" / "acceso denegado"), causing silent fallback failure
on non-English Windows systems (Chinese, Japanese, French, German, etc.)
Fix:
- Replace regex matching with exit code check (params.code === 1)
- schtasks returns exit code 1 for access denied / generic failure
regardless of system locale
Fixes: openclaw#85255
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-22 19:37 UTC / May 22, 2026, 3:37 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows current main only recognizes English/Spanish denial text and timeout/no-output cases, so the linked zh-CN denial detail would miss the fallback path; I did not run Windows proof in this read-only review. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Merge after normal checks if maintainers intend the proof override to accept the Windows exit-code behavior; otherwise request redacted Windows terminal/log proof before merge while keeping the existing text and timeout fallbacks. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main only recognizes English/Spanish denial text and timeout/no-output cases, so the linked zh-CN denial detail would miss the fallback path; I did not run Windows proof in this read-only review. Is this the best way to solve the issue? Yes, with maintainer acceptance of the broader exit-code trigger. Adding code 1 while preserving existing text and timeout fallbacks is the narrowest code fix shown here, but the external command contract is not documented by Microsoft. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against e0fda55cf7f4. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Mossy Test Hopper Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
…lback (openclaw#85347) * fix(daemon): use exit code instead of localized text for schtasks fallback Problem: - shouldFallbackToStartupEntry() only matched English/Spanish error messages ("access is denied" / "acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, etc.) Fix: - Replace regex matching with exit code check (params.code === 1) - schtasks returns exit code 1 for access denied / generic failure regardless of system locale Fixes: openclaw#85255 * test(daemon): cover localized schtasks fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
Summary
Fixes
shouldFallbackToStartupEntry()silently failing on non-English Windows systems by using exit code instead of localized error text matching.Problem
The regex only matched English/Spanish error messages (
"access is denied"/"acceso denegado"), causing silent fallback failure on non-English Windows systems (Chinese, Japanese, French, German, Korean, Russian, etc.).Fix
/access is denied|acceso denegado/iregex withparams.code === 1Files Changed
src/daemon/schtasks.tsFixes: #85255