fix(cron): clear pre-execution watchdog on any phase notification (#93530)#93591
fix(cron): clear pre-execution watchdog on any phase notification (#93530)#93591fsdwen wants to merge 2 commits into
Conversation
…enclaw#93530) When no before_agent_reply hook is registered, the phase notification is never emitted, causing the 60s pre-execution timeout to fire even though the runner is alive with other phases arriving. Change the pre-execution clear condition from 'stage === execution' to 'stage !== undefined' so any phase notification proves the runner is making progress and clears the pre-execution timeout. Co-Authored-By: Claude <[email protected]>
…enclaw#93530) When no before_agent_reply hook is registered, the phase notification is gated behind hookRunner.hasHooks(), so the cron pre-execution watchdog never receives the 'execution' stage signal and fires prematurely. Move notifyExecutionPhase('before_agent_reply') outside the hasHooks guard so the watchdog always learns the agent entered execution for cron triggers. Hook execution remains guarded. Also fix the same pattern in the CLI runner. Co-Authored-By: Claude <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 2:01 AM ET / 06:01 UTC. Summary PR surface: Source +8. Total +8 across 2 files. Reproducibility: yes. Source inspection shows the PR head emits Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Settle one canonical cron phase contract that clears real no-hook/setup progress without hiding true startup or fallback stalls, then land it with focused regression coverage and redacted real cron proof. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows the PR head emits Is this the best way to solve the issue? No. Moving the phase notification outside Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fc5ba0e58bb4. Label changesLabel justifications:
Evidence reviewedPR surface: Source +8. Total +8 across 2 files. View PR surface stats
What I checked:
Likely related people:
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. How this review workflow works
Review history (1 earlier review cycle)
|
Summary
Cron isolated-agent jobs abort prematurely (~6 min) even with a 10 min
timeout. The 60s pre-execution watchdog fires because the
before_agent_replyphase notification is gated behindhookRunner.hasHooks("before_agent_reply")— when no hook is registered,the phase is never emitted to the watchdog, which never transitions to
the "executing" state.
Fix
Move
notifyExecutionPhase("before_agent_reply", ...)outside thehasHooksguard so the phase is always emitted for cron triggers.Hook execution (
runBeforeAgentReply) remains guarded byhasHooks.Changes: 3 files (run.ts, cli-runner.ts — both runner-side guards)
Verification
All watchdog-related tests pass
Fixes #93530
🤖 Generated with Claude Code