openclaw - 💡(How to fix) Fix [Bug]: Cron job with agentTurn payload fails: TypeError reading 'sourceReplyDeliveryMode'

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…

/home/z01/.openclaw/workspace/bug-report-cron-agent-turn-delivery.md

bug-report-cron-agent-turn-delivery.md

Error Message

Total runs: 4 Successful: 0 Failed: 4 (100%) Last error: TypeError: Cannot read properties of undefined (reading 'sourceReplyDeliveryMode')

Root Cause

/home/z01/.openclaw/workspace/bug-report-cron-agent-turn-delivery.md

bug-report-cron-agent-turn-delivery.md

Fix Action

Fix / Workaround

Consequence:

  • Missed scheduled tasks (no job results delivered)
  • User must manually run tasks (workaround: execute agent turn directly in main session)
  • No notification of failure unless user checks job run history manually

Code Example

openclaw cron add --name "test-job" --schedule "0 9 * * *" --tz "Europe/Berlin" \
  --payload '{"kind":"agentTurn","message":"echo hello"}' \
  --session-target isolated \
  --delivery none

---

openclaw cron run --job-id <job-id>

---

openclaw cron runs --job-id <job-id>

---

openclaw cron list
# Observe: consecutiveErrors: >0, lastStatus: "error"

openclaw sessions history --session-key agent:main:cron:<job-id>:run:<run-id>
# Observe: messages: [], bytes: 2

---

sessionTarget: "isolated"Run in an ephemeral isolated session (requires payload.kind="agentTurn")
payload.kind: "agentTurn"Runs agent with message in isolated session

---

{
  "models": {
    "mode": "merge",
    "providers": {
      "ollama": {
        "api": "ollama",
        "baseUrl": "http://127.0.0.1:11434",
        "models": [
          {
            "id": "glm-5:cloud",
            "name": "glm-5:cloud",
            "reasoning": true,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0
            }
          }
        ]
      }
    }
  }
}

---

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "ollama/glm-5:cloud"
      },
      "workspace": "/home/z01/.openclaw/workspace",
      "contextInjection": "continuation-skip",
      "bootstrapMaxChars": 5000,
      "bootstrapTotalMaxChars": 30000
    }
  }
}

---

{
  "label": "openclaw-control-ui",
  "id": "openclaw-control-ui"
}

---

"last -> no route, will fail-closed: Channel is required (no configured channels detected)."

---



---

Total runs: 4
Successful: 0
Failed: 4 (100%)
Last error: TypeError: Cannot read properties of undefined (reading 'sourceReplyDeliveryMode')
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

/home/z01/.openclaw/workspace/bug-report-cron-agent-turn-delivery.md

bug-report-cron-agent-turn-delivery.md

Steps to reproduce

Steps to Reproduce

Prerequisites:

  • OpenClaw Gateway running
  • No chat channels configured (default setup)
  • Any model configured

Repro Steps:

  1. Create a cron job with agentTurn payload:
openclaw cron add --name "test-job" --schedule "0 9 * * *" --tz "Europe/Berlin" \
  --payload '{"kind":"agentTurn","message":"echo hello"}' \
  --session-target isolated \
  --delivery none
  1. Trigger manually:
openclaw cron run --job-id <job-id>
  1. Check run result:
openclaw cron runs --job-id <job-id>

Expected: status: "success"

Observed: status: "error", error: TypeError: Cannot read properties of undefined (reading 'sourceReplyDeliveryMode')

Verification:

openclaw cron list
# Observe: consecutiveErrors: >0, lastStatus: "error"

openclaw sessions history --session-key agent:main:cron:<job-id>:run:<run-id>
# Observe: messages: [], bytes: 2

Deterministic: Yes — reproduces 100% of the time across 4 consecutive runs.

Expected behavior

Expected Behavior

Expected Result:

Cron jobs with payload.kind: "agentTurn" and sessionTarget: "isolated" should:

  1. Create an isolated agent session
  2. Execute the agent turn with the specified message
  3. Complete with status "success"
  4. Either deliver results (if delivery.mode: "announce") or write outputs to filesystem (if agent task includes file writes)

Grounded Reference:

NOT_ENOUGH_INFO — No prior observed successful run exists for this job. Documentation reference: Cron Jobs

From OpenClaw Cron Tool Documentation:

sessionTarget: "isolated" → Run in an ephemeral isolated session (requires payload.kind="agentTurn")
payload.kind: "agentTurn" → Runs agent with message in isolated session

Expected Session State After Successful Run:

  • Session should contain agent messages and tool outputs
  • sessions_history should return non-empty message list
  • cron action=runs should show status: "success"

Observed vs Expected:

FieldExpectedObserved
Run statussuccesserror
Session messagesNon-emptyEmpty (bytes: 2)
Delivery statusdelivered or not-requestedunknown
ErrorNoneTypeError: sourceReplyDeliveryMode

Actual behavior

Observed Result:

Cron jobs with payload.kind: "agentTurn" fail immediately with a TypeError before any agent execution begins.

Evidence:

Job Configuration: Job Run History (from cron action=runs): Session Created (from cron action=runs): Session History (from sessions_history): → Session is empty; agent never executed.

Sender Metadata (from execution context): User-Visible Effect:

Cron job runs fail silently (no error notification delivered) stellenangebote.md remains unchanged ("Warte auf erste Cron-Ausführung...") No agent output, no delivery attempt Attempts to Mitigate:

Changed delivery.mode from announce to none → same error Manual trigger via cron action=run → same error

OpenClaw version

v2026.5.7

Operating system

Zorin OS 18.1 Pro

Install method

npm install -g openclaw@latest

Model

ollama/glm-5:cloud

Provider / routing chain

OpenClaw Gateway → Ollama API → glm-5:cloud

Additional provider/model setup details

Additional Provider/Model Setup Details

Model Configuration:

{
  "models": {
    "mode": "merge",
    "providers": {
      "ollama": {
        "api": "ollama",
        "baseUrl": "http://127.0.0.1:11434",
        "models": [
          {
            "id": "glm-5:cloud",
            "name": "glm-5:cloud",
            "reasoning": true,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0
            }
          }
        ]
      }
    }
  }
}

Agent Defaults:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "ollama/glm-5:cloud"
      },
      "workspace": "/home/z01/.openclaw/workspace",
      "contextInjection": "continuation-skip",
      "bootstrapMaxChars": 5000,
      "bootstrapTotalMaxChars": 30000
    }
  }
}

Environment:

  • No auth-profile rotation configured
  • No model fallbacks configured
  • Single provider (Ollama local)
  • No per-agent overrides

Sender Metadata:

{
  "label": "openclaw-control-ui",
  "id": "openclaw-control-ui"
}

→ Job triggered from OpenClaw Control UI (dashboard at http://127.0.0.1:18789/), not from a chat channel.

Delivery Preview (from cron action=list):

"last -> no route, will fail-closed: Channel is required (no configured channels detected)."

→ No chat channels configured; delivery.mode: announce requires a channel. However, error persists even with delivery.mode: none.

Logs, screenshots, and evidence

Impact and severity

Impact and Severity

Affected Users/Systems:

  • Users running cron jobs with payload.kind: "agentTurn" and sessionTarget: "isolated"
  • Jobs triggered from OpenClaw Control UI (dashboard) or scheduled cron
  • NOT_ENOUGH_INFO: whether sessionTarget: "main" or systemEvent payloads are affected

Severity:

  • Blocks workflow – scheduled agent tasks cannot execute
  • No data risk (jobs fail before execution)
  • No cost impact (no model tokens consumed)

Frequency:

  • Always – 100% failure rate observed across 4 job runs (3 scheduled, 1 manual trigger)
  • Error is deterministic and reproducible

Consequence:

  • Missed scheduled tasks (no job results delivered)
  • User must manually run tasks (workaround: execute agent turn directly in main session)
  • No notification of failure unless user checks job run history manually

Evidence:

Total runs: 4
Successful: 0
Failed: 4 (100%)
Last error: TypeError: Cannot read properties of undefined (reading 'sourceReplyDeliveryMode')

Additional information

NOT_ENOUGH_INFO

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…

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: TypeError reading 'sourceReplyDeliveryMode'