openclaw - 💡(How to fix) Fix [Bug]: Cron job with agentTurn payload fails with TypeError: Cannot read properties of undefined

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…

Cron job with agentTurn payload fails with TypeError: Cannot read properties of undefined

Error Message

  1. Job fails immediately with error: Error Analysis Error Location: attempt-execution-CU4DLDLC.js line 419

Root Cause

Root Cause: When a Cron job triggers an agentTurn task, params.opts is undefined, causing all code that accesses params.opts.xxx to throw errors.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Cron job with agentTurn payload fails with TypeError: Cannot read properties of undefined

Steps to reproduce

  1. Create a Cron job with agentTurn payload type: { "name": "Test AgentTurn Job", "schedule": { "expr": "0 9 * * *", "kind": "cron", "tz": "Asia/Shanghai" }, "payload": { "kind": "agentTurn", "message": "Say hello" }, "sessionTarget": "isolated" }

  2. Manually trigger or wait for scheduled execution

  3. Job fails immediately with error: TypeError: Cannot read properties of undefined (reading 'sourceReplyDeliveryMode')

Expected behavior

Error Analysis Error Location: attempt-execution-CU4DLDLC.js line 419 sourceReplyDeliveryMode: params.opts.sourceReplyDeliveryMode,

Root Cause: When a Cron job triggers an agentTurn task, params.opts is undefined, causing all code that accesses params.opts.xxx to throw errors.

Affected Code: Multiple places access params.opts:

  • params.opts.threadId
  • params.opts.senderIsOwner
  • params.opts.images
  • params.opts.bashElevated
  • params.opts.sourceReplyDeliveryMode
  • etc.

Actual behavior

Workspace

  • ✅ Cron trigger mechanism works
  • ✅ systemEvent payload works correctly
  • ❌ agentTurn payload fails

OpenClaw version

OpenClaw 2026.5.20 (e510042)

Operating system

macOS 26.3.1 (arm64), Node.js v22.22.2

Install method

npm global

Model

minimax-m2.5

Provider / routing chain

minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

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

Error Analysis Error Location: attempt-execution-CU4DLDLC.js line 419 sourceReplyDeliveryMode: params.opts.sourceReplyDeliveryMode,

Root Cause: When a Cron job triggers an agentTurn task, params.opts is undefined, causing all code that accesses params.opts.xxx to throw errors.

Affected Code: Multiple places access params.opts:

  • params.opts.threadId
  • params.opts.senderIsOwner
  • params.opts.images
  • params.opts.bashElevated
  • params.opts.sourceReplyDeliveryMode
  • etc.

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 - 💡(How to fix) Fix [Bug]: Cron job with agentTurn payload fails with TypeError: Cannot read properties of undefined