openclaw - ✅(Solved) Fix [Bug]: Dreaming cron job times out at 10 minutes even though manual trigger completes in ~2-4 minutes [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68743Fetched 2026-04-19 15:08:05
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×2subscribed ×2commented ×1cross-referenced ×1

reaming cron job times out at 10 minutes even though manual trigger completes in 2-4 minutes

Error Message

Cron job runs for exactly 10 minutes (600050ms) then is killed with status 'error: cron: job execution timed out'

Root Cause

reaming cron job times out at 10 minutes even though manual trigger completes in 2-4 minutes

Fix Action

Fixed

PR fix notes

PR #68753: fix: allow systemEvent cron jobs to specify custom timeoutSeconds

Description (problem / solution / changelog)

Fixes #68743

Problem

The Memory Dreaming Promotion cron job uses payload.kind='systemEvent', which gets the default 10-minute timeout (DEFAULT_JOB_TIMEOUT_MS). However, dreaming triggers a full agent turn via the main session heartbeat that typically takes 2-4 minutes but can exceed 10 minutes on slower providers or large memory stores. The job times out and is killed every night.

The timeoutSeconds field was only available on agentTurn payloads, so there was no way for systemEvent jobs (like dreaming) to configure a longer timeout.

Fix

  1. Added optional timeoutSeconds to the systemEvent payload type
  2. Updated resolveCronJobTimeoutMs() to read timeoutSeconds from any payload kind, not just agentTurn
  3. When timeoutSeconds is unset, defaults remain unchanged (10min for systemEvent, 60min for agentTurn)

This enables the dreaming plugin (and any other managed cron job) to set an appropriate timeout via timeoutSeconds in the job payload.

Changes

  • src/cron/types.ts — added timeoutSeconds? to systemEvent payload
  • src/cron/service/timeout-policy.ts — removed agentTurn-only guard on timeoutSeconds
  • src/cron/service/timeout-policy.test.ts — added tests for systemEvent timeout configuration

Changed files

  • src/cron/service/timeout-policy.test.ts (modified, +14/-0)
  • src/cron/service/timeout-policy.ts (modified, +1/-1)
  • src/cron/types.ts (modified, +6/-2)

Code Example

Cron run history:
| Timestamp | Trigger | Status | Duration |
|-----------|---------|--------|----------|
| 4/19 03:09 | manual | ok | 13ms |
| 4/19 03:07 | cron | timeout | 600050ms |
| 4/18 03:00 | cron | timeout | 601114ms |
| 4/17 03:00 | cron | timeout | 635454ms |
| 4/15 03:00 | cron | ok | ~250s |

System: OpenClaw 2026.4.15, RAM 3.8GB (available ~2.3GB)
Job ID: cb49d29c-0dac-4dbd-9fa8-8adbb446e790
Secondary: MEMORY.md (18937 chars) is truncated to 12000 chars during bootstrap injection.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

reaming cron job times out at 10 minutes even though manual trigger completes in 2-4 minutes

Steps to reproduce

  1. Leave the Memory Dreaming Promotion cron job enabled with schedule '0 3 * * *'
  2. Observe the job at the next scheduled run

Expected behavior

Cron-triggered dreaming completes in 2-4 minutes like manual trigger

Actual behavior

Cron job runs for exactly 10 minutes (600050ms) then is killed with status 'error: cron: job execution timed out'

OpenClaw version

2026.4.15

Operating system

Ubuntu 24.04

Install method

From repo

Model

minimax/MiniMax-M2.7

Provider / routing chain

https://api.minimaxi.com/anthropic

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Cron run history:
| Timestamp | Trigger | Status | Duration |
|-----------|---------|--------|----------|
| 4/19 03:09 | manual | ok | 13ms |
| 4/19 03:07 | cron | timeout | 600050ms |
| 4/18 03:00 | cron | timeout | 601114ms |
| 4/17 03:00 | cron | timeout | 635454ms |
| 4/15 03:00 | cron | ok | ~250s |

System: OpenClaw 2026.4.15, RAM 3.8GB (available ~2.3GB)
Job ID: cb49d29c-0dac-4dbd-9fa8-8adbb446e790
Secondary: MEMORY.md (18937 chars) is truncated to 12000 chars during bootstrap injection.

Impact and severity

• Affected: Memory promotion via dreaming cron • Severity: Annoying, blocks workflow — nightly memory promotion fails • Frequency: Always on scheduled cron trigger • Consequence: Memory promotions never complete

Additional information

Regression: last known good was before upgrading to OpenClaw 4.1+. Also observed: MEMORY.md truncation (18937 chars limited to 12000) during bootstrap injection in dreaming sessions, which may affect context quality.

extent analysis

TL;DR

The cron job timeout issue may be resolved by investigating and addressing the MEMORY.md truncation during bootstrap injection, which could be causing the job to hang and eventually timeout.

Guidance

  • Investigate the impact of MEMORY.md truncation on the dreaming session, as it may be causing the job to take longer than expected, leading to the timeout.
  • Verify if the manual trigger completes successfully with the same MEMORY.md file, to determine if the issue is specific to the cron trigger or the file itself.
  • Check the OpenClaw documentation for any configuration options or workarounds for handling large MEMORY.md files, as the current limit of 12000 chars may be too restrictive.
  • Consider increasing the timeout value for the cron job, if possible, to allow the job to complete even if it takes longer than the current 10-minute limit.

Example

No code snippet is provided, as the issue is more related to configuration and job execution rather than code.

Notes

The issue may be specific to the OpenClaw version 2026.4.15, and upgrading to a newer version may resolve the issue. However, without further information, it's difficult to determine the root cause.

Recommendation

Apply workaround: Investigate and address the MEMORY.md truncation issue, as it's likely the primary cause of the cron job timeout. This may involve increasing the character limit or modifying the bootstrap injection process to handle larger files.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Cron-triggered dreaming completes in 2-4 minutes like manual trigger

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Dreaming cron job times out at 10 minutes even though manual trigger completes in ~2-4 minutes [1 pull requests, 1 comments, 2 participants]