Skip to content

Isolated cron consistently fails with "LLM request failed" on model-call-started phase #91363

Closed as not planned

Description

@pangruixin110-source

Bug type: Behavior bug

Summary: Isolated cron jobs (sessionTarget: "isolated") consistently fail with "LLM request failed" or "timed out (last phase: model-call-started)" regardless of timeoutSeconds setting; model requests never reach the provider (usage.input=0), and manual cron run triggers initially work but eventually also fail after repeated failures.

Steps to reproduce:

  1. Configure an isolated cron job (sessionTarget: "isolated" with an agent turn prompt).
  2. Wait for automatic cron trigger at the scheduled time.
  3. Observe LLM request failed or timed out (last phase: model-call-started) in gateway logs.
  4. Run openclaw cron run <cron-id> manually — this works initially (14s–28s response time).
  5. Wait for another automatic failure (e.g., 5+ consecutive failures).
  6. Run cron run again — it now fails as well.
  7. Restart the gateway → manual triggers work again temporarily, then fail after another automatic trigger fails.
  8. Set timeoutSeconds: 0 as workaround — does not help.

Expected behavior: Isolated cron jobs should consistently execute the agent turn prompt and complete successfully, similar to non-isolated cron triggers.

Actual behavior: All automatic cron triggers fail (5+ consecutive attempts). Manual cron run initially succeeds (14s–28s) but later also fails. usage.input: 0 in diagnostics confirms the model request never reaches the provider. queueDepth=1 persists. Error from diagnostics: "LLM request failed" with underlying error "Request was aborted". consecutiveErrors counter keeps increasing. Gateway restart provides only temporary recovery.

OpenClaw version: 2026.6.1 (commit 2e08f0f)

Operating system: macOS 15.4 (Darwin arm64)

Install method: npm global (openclaw@2026.6.1)

Model: deepseek/deepseek-v4-flash

Provider / routing chain: openclaw → zai (api_key auth) → deepseek

Additional provider/model setup details:

  • Auth profile: zai:cn with mode: api_key

Additional information:

Activity

  1. clawsweeper commented on Jun 8, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

    Close as a duplicate of the active canonical report: current main still emits the implicated cron prompt envelope, and the latest controlled production A/B evidence links that remaining failure family to the canonical investigation and candidate repair.

    Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

    Canonical path: Consolidate the envelope repair and provider-specific validation under the canonical report rather than keeping parallel investigations open.

    So I’m closing this here because the remaining work is already tracked in the canonical issue.

    Review details

    Best possible solution:

    Consolidate the envelope repair and provider-specific validation under the canonical report rather than keeping parallel investigations open.

    Do we have a high-confidence way to reproduce the issue?

    No local reproduction was run; however, the latest thread comment supplies a controlled production A/B, and current source confirms that the implicated envelope remains.

    Is this the best way to solve the issue?

    Yes for triage: the canonical report is the narrowest place to validate and land the shared envelope repair, while this issue adds no distinct remaining owner boundary.

    Security review:

    Security review: This is issue triage without a proposed patch.

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • Yzx: Authored the historical cron stream-stall fallback commit used by the current watchdog path. (role: introduced shipped stream-stall fallback repair; confidence: high; commits: 7fefc5ff58de; files: src/agents/embedded-agent-runner/run/llm-idle-timeout.ts)
    • TUARAN: Current blame assigns the extracted cron-preparation surface to this recent source snapshot commit. (role: recent current-source contributor; confidence: medium; commits: d30c036b68c5; files: src/cron/isolated-agent/run-prepare.ts, src/cron/isolated-agent.session-identity.test.ts)
    • Dytchem: Provided the controlled production A/B evidence and linked the canonical report and candidate repair. (role: recent reproducer; confidence: high)

    Codex review notes: model internal, reasoning high; reviewed against d2be00e171f6.

  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Jun 8, 2026
  3. TecnoTalarn commented on Jun 9, 2026

    @TecnoTalarn

    I am experiencing the exact same issue. The cron execution is failing on my setup as well.

    Environment & Setup:

    • OS: macOS (latest version)
    • Hardware: Mac Mini (Apple Silicon M4 32Gb)
    • Models tested: DeepSeek (connected directly) and local models (e.g., qwen3:14b).

    This appears to be a regression. The cron feature was working perfectly fine on my previous installation using OpenClaw version 2026.5.12.

    Let me know if you need me to pull any specific logs to help debug this!

  4. yangzhe1991 commented on Jun 9, 2026

    @yangzhe1991

    Same issue here. Not sure how much it has to do with the new version, but I indeed encountered the same issue after upgrading from the early May version to the latest one.

    My current debugging result is that in crontasks, LLM requests seem to easily get stuck and become "stalled sessions", while normal tasks do not. Moreover, because the timeout configured at the model provider level (default 600s) is longer than the stalled judgment time (default 360s), the model request does not retry but directly kills the entire cron task.

    My current workaround is to change the model provider-level timeout to 120s, ensuring that the model timeout occurs first rather than the session stalling. This way, the model will retry, and after 1-2 retries, the cron task will finally complete.

  5. TecnoTalarn commented on Jun 9, 2026

    @TecnoTalarn

    @yangzhe1991 Thanks for the suggestion. I've just implemented your workaround and I'll wait until tomorrow to see the actual results.

    I tested a cron job right after rebooting and it worked perfectly, but as mentioned in other posts on this issue, this is the expected behavior right after a restart. I'll report back tomorrow with an update!

    Thanks!

  6. c0o1sy1z3 commented on Jun 11, 2026

    @c0o1sy1z3

    @yangzhe1991 Thanks for the suggestion. I've just implemented your workaround and I'll wait until tomorrow to see the actual results.

    I tested a cron job right after rebooting and it worked perfectly, but as mentioned in other posts on this issue, this is the expected behavior right after a restart. I'll report back tomorrow with an update!

    Thanks!

    Same issue here.

    I have two independent agents in the same environment. Both cron consistently fails on schedule but succeeds on manual trigger(expect for the weather skill).

    Agent A fails with deepseek/deepseek-v4-flash with the message: Cron job "xxx" failed: LLM request failed.
    Agent B fails with minimax/MiniMax-M2.7 with the message: Cron job "xxx" failed: FailoverError: The AI service is temporarily overloaded. Please try again in a moment.

    I tried different time period and never succeed on schedule. The models can't be overloaded coz they respond at the same time in other sessions.

    To be honest, this issue disturbs me since middle of May. I upgraded from 4.xx to 5.28 at that time. Before that the cron never failed like this. I tried lot's of methods to fix it but failed.

    Several days ago I found this post: 91636 I upgraded it to 6.5 and the issue still happened. The ONLY difference is: Agent B tried three times automatically and the last time succeeded.

    Current version: OpenClaw 2026.6.5 (5181e4f)
    Operation system: macOS Tahoe 26.5.1

  7. TecnoTalarn commented on Jun 11, 2026

    @TecnoTalarn

    I’m reporting that the issue still persists after updating to version 2026.6.5.

    I have already tried reducing the timeout duration as a workaround, but unfortunately, it did not resolve the problem. As a temporary measure, I have moved these tasks to the system's crontab instead of using the OpenClaw scheduler. While this keeps things running, it is significantly more cumbersome to manage.

    I look forward to a fix for the integrated cron service. Thanks for your hard work on this.

  8. 22 remaining items

  9. anoblet commented on Aug 3, 2026

    @anoblet

    I am also experiencing this issue.

  10. added
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    and removed
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    on Aug 4, 2026
  11. added
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    on Aug 12, 2026
  12. Dytchem commented on Aug 14, 2026

    @Dytchem

    Adding production data that may be useful to everyone in this thread (this is the same failure family we've been tracking in #121953):

    On our setup, after switching the cron user-message envelope from [cron:<jobId> <jobName>] to [Cron: (case-only change, same producer), the affected 10-minute job ran 200 consecutive runs with zero LLM request failures (2026-08-13 02:05 → 08-14 14:14 local; queried via openclaw cron runs --limit 200):

    • 192 ok / 8 error, 0 LLM stalls/timeouts. The 8 errors are all tool-layer (local file-edit failures, one subprocess failure) — the model call never failed in any of them.
    • No restart needed across the whole span; pre-fix, the same job accumulated consecutive failures until a gateway restart (matching heshengshi's "restart fixes it" pattern).
    • Durations: 145s–1387s normal tool loops; no HTTP 200 + truncated-body + trailing : keep-alive stalls (that stall shape disappeared entirely).

    For those still affected on 2026.6.x/2026.7.x: worth checking whether your failing cron turns' user messages carry the [cron:...] envelope prefix — the controlled cold-cache A/B (bracket grammar vs plain text at the same position) reproduces the stall on the bracket form only. Relevant PR: #122035 ; controlled A/B evidence: https://gist.github.com/Dytchem/4ad1035e016241dd8a99211a4974244d

    For yangzhe1991's timeout-race workaround (provider timeout 120s): that works around the second stall path (watchdog kill vs provider timeout ordering); the envelope fix addresses the trigger itself, so both can be relevant depending on provider.

  13. removed
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    on Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions