Repository navigation
Conversation
The hardcoded 60-second setup and pre-execution watchdog timeouts are too aggressive for environments where the Codex app-server startup takes longer (OAuth resolution, sandbox provisioning, model prewarm on modest hardware). Changes: - Increase default CRON_AGENT_SETUP_WATCHDOG_MS from 60s to 180s - Increase default CRON_AGENT_PRE_EXECUTION_WATCHDOG_MS from 60s to 180s - Make both configurable via cronConfig.setupWatchdogMs and cronConfig.preExecutionWatchdogMs This fixes all isolated-session cron jobs failing with: 'cron: isolated agent setup timed out before runner start' or silently aborting at 60s before the first model call. Tested on OpenClaw 2026.5.12 running on Raspberry Pi 5 where Codex app-server startup consistently takes 70-90s.
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close this PR as duplicate/superseded: #82223 already tracks the same isolated-cron watchdog fix with broader schema, docs, and tests, and this PR's author supplied detailed proof there while saying this branch could close in favor of that one. Canonical path: #82662 remains open for the same root behavior and now links both overlapping PRs and the author's live proof. So I’m closing this here and keeping the remaining discussion on #82223 and #82662. Review detailsBest possible solution: Keep the proof and implementation discussion consolidated on #82223 and the root issue, then land one complete schema/docs/tests-backed fix if maintainers approve the timeout policy. Do we have a high-confidence way to reproduce the issue? No high-confidence local reproduction was run in this review. Source inspection shows the current 60s watchdog path and the author's related live logs show the failure/recovery pattern on OpenClaw 2026.5.12, but exact current-main or PR-head behavior was not executed here. Is this the best way to solve the issue? No. Raising the watchdogs may be part of the fix, but this branch is the weaker duplicate because its public config keys are not wired into the strict config schema while #82223 already carries the broader contract work. Security review: Security review cleared: The diff touches cron timer logic and TypeScript config types only; I found no concrete dependency, workflow, secret, or supply-chain concern. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 69a0c925b890. |
|
Note: #82223 is an existing PR with the same fix (raises watchdogs from 60s to 5m, makes configurable). That PR is labeled Happy to close this in favor of #82223 if the maintainers prefer to consolidate. Both patches address the same root cause (issues #82662, #81368, #81475, #80888, #74803). |
Problem
All isolated-session cron jobs (
sessionTarget: "isolated",payload.kind: "agentTurn") fail with:or silently abort at exactly 60 seconds when the Codex app-server harness takes longer than 60s to spawn and reach the first model call.
Root Cause
Two hardcoded 60-second watchdog constants in
src/cron/service/timer.ts:CRON_AGENT_SETUP_WATCHDOG_MS— fires if the runner never starts within 60sCRON_AGENT_PRE_EXECUTION_WATCHDOG_MS— fires if execution phase (first model call) is not reached within 60s of runner startThese are too aggressive for environments where Codex app-server startup involves OAuth token resolution, sandbox provisioning, and model prewarm — all of which routinely exceed 60s on modest hardware (Raspberry Pi, low-end VPS).
Meanwhile, the per-job
timeoutSeconds(default 300s) is generous enough. The watchdogs fire long before the job timeout would.Changes
CRON_AGENT_SETUP_WATCHDOG_MSfrom 60s to 180sCRON_AGENT_PRE_EXECUTION_WATCHDOG_MSfrom 60s to 180scronConfig.setupWatchdogMsandcronConfig.preExecutionWatchdogMsWhy 180s?
Testing
Patched the compiled JS on OpenClaw 2026.5.12 (f066dd2):
durationMs=130542 aborted=false)