Remove hard agent-turn timeout from cron/task schedulers#214
Open
LIU9293 wants to merge 1 commit into
Open
Conversation
Cron jobs and one-time tasks both wrapped `agent.sendMessage` in a 2h hard timeout (`ODE_CRON_AGENT_TIMEOUT_MS` / `ODE_TASK_AGENT_TIMEOUT_MS`). Long-running agent workflows (Sentry triage, board grooming, multi-PR sweeps, scheduled audits) routinely tripped this cap and surfaced as "Request timed out" failures even though the underlying agent was making progress. Drop the wrap on both sides. We still keep the prepare-step timeout (session creation + worktree setup) so a wedged setup can't hold the in-process `runningJobIds`/`runningTaskIds` lock; truly hung turns are still recoverable via the daemon restart reconcile path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The cron scheduler (
packages/core/cron/scheduler.ts) and one-time task scheduler (packages/core/tasks/scheduler.ts) both wrappedagent.sendMessagein a 2h hard timeout viawithTimeout(configurable viaODE_CRON_AGENT_TIMEOUT_MS/ODE_TASK_AGENT_TIMEOUT_MS).This bound was tripping on legitimate long-running agent workflows — Sentry triage, Linear board grooming, multi-PR sweeps, scheduled audits — and surfacing in Slack as:
even though the underlying agent was making progress. Verified on this machine: two recent runs of `Sentry检查` and `PM推进` both failed with `CronStepTimeoutError: Cron agent turn timed out after 7200000ms` (= exactly the 2h default).
What
What we keep
Verification