openclaw - ✅(Solved) Fix [BUG] delivery.mode = "none" incorrectly reports "not-delivered" instead of "not-requested" [1 pull requests, 1 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#44533Fetched 2026-04-08 00:45:36
View on GitHub
Comments
0
Participants
1
Timeline
17
Reactions
0
Author
Participants
Timeline (top)
referenced ×8cross-referenced ×7labeled ×2

When delivery.mode = "none" is set in a cron job config, the system incorrectly reports lastDeliveryStatus: "not-delivered" instead of "not-requested".

Root Cause

Root cause: Code checks legacy payload.deliver field instead of new payload.delivery.mode.

Fix Action

Fixed

PR fix notes

PR #44594: fix(cron): report not-requested when delivery.mode=none and delivered=false

Description (problem / solution / changelog)

Summary

  • When a cron job has delivery.mode = "none", delivery is never requested. Previously, if the job runner returned delivered: false, resolveDeliveryStatus would report "not-delivered" — implying a delivery failure occurred. This fix checks whether delivery was actually requested before reporting "not-delivered", correctly returning "not-requested" for mode: none jobs.

Changes

  • src/cron/service/timer.ts: Updated resolveDeliveryStatus() to check the delivery plan's requested flag when delivered === false. If delivery was not requested, returns "not-requested" instead of "not-delivered".
  • src/cron/service.persists-delivered-status.test.ts: Updated existing test to reflect correct behavior, added new test for delivered=false when delivery WAS requested (mode=announce).

Fixes #44533

Changed files

  • src/config/io.ts (modified, +18/-0)
  • src/config/io.write-config.test.ts (modified, +20/-0)
  • src/config/types.openclaw.ts (modified, +2/-0)
  • src/cron/service.persists-delivered-status.test.ts (modified, +18/-2)
  • src/cron/service/timer.ts (modified, +5/-2)

Code Example

Cron job: digest-generator
delivery: { mode: "none" }
lastDeliveryStatus: "not-delivered"WRONG

The delivery was NOT requested, so status should NOT be "not-delivered".

---

const deliveryMode =
    payload?.delivery?.mode ??
    (payload?.deliver === true ? "announce"
    : payload?.deliver === false ? "none"
    : "auto");
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

When delivery.mode = "none" is set in a cron job config, the system incorrectly reports lastDeliveryStatus: "not-delivered" instead of "not-requested".

Steps to reproduce

  1. Create a cron job with delivery: { mode: "none" }
  2. Wait for job to run
  3. Check lastDeliveryStatus

Expected behavior

Expected: "not-requested" (or similar non-failure state)

Actual behavior

Actual: "not-delivered"

OpenClaw version

2026.3.8

Operating system

Windows Server 2022

Install method

npm global

Model

minimax/MiniMax-M2.5

Provider / routing chain

openclaw → cloudflare-ai-gateway → minimax

Config file / key location

Jobs configured via openclaw cron add with delivery: { mode: "none" }

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Cron job: digest-generator
delivery: { mode: "none" }
lastDeliveryStatus: "not-delivered"  ← WRONG

The delivery was NOT requested, so status should NOT be "not-delivered".

Impact and severity

  • Affected: Users with cron jobs using delivery.mode = "none"
  • Severity: Medium (telemetry only, no functional impact)
  • Frequency: 100% - always shows wrong status
  • Consequence: False "failed" alerts, confusing health reports

Additional information

Root cause: Code checks legacy payload.deliver field instead of new payload.delivery.mode.

Proposed fix:

const deliveryMode =
    payload?.delivery?.mode ??
    (payload?.deliver === true ? "announce"
    : payload?.deliver === false ? "none"
    : "auto");

Test cases:

InputExpected
{ delivery: { mode: "none" }, to: "123" }"not-requested"
{ delivery: { mode: "announce" } } + send fails"not-delivered"

This preserves real failure detection while fixing false telemetry.

github-issue-delivery-mode-bug.md

extent analysis

Fix Plan

To fix the issue, update the code to correctly check the delivery.mode field. Replace the existing code with the following:

const deliveryMode =
    payload?.delivery?.mode ??
    (payload?.deliver === true ? "announce"
    : payload?.deliver === false ? "none"
    : "auto");

Steps:

  1. Update the cron job configuration parsing code to use the new deliveryMode variable.
  2. Add a conditional statement to set lastDeliveryStatus to "not-requested" when deliveryMode is "none".
if (deliveryMode === "none") {
    lastDeliveryStatus = "not-requested";
} else {
    // existing logic to set lastDeliveryStatus
}
  1. Test the changes with the provided test cases to ensure the fix works as expected.

Verification

To verify the fix, run the following tests:

  • Create a cron job with delivery: { mode: "none" } and check that lastDeliveryStatus is set to "not-requested".
  • Create a cron job with delivery: { mode: "announce" } and simulate a send failure to check that lastDeliveryStatus is set to "not-delivered".

Extra Tips

  • Make sure to update the documentation to reflect the changes to the delivery.mode field.
  • Consider adding additional logging or monitoring to detect any potential issues with the new logic.

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

Expected: "not-requested" (or similar non-failure state)

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] delivery.mode = "none" incorrectly reports "not-delivered" instead of "not-requested" [1 pull requests, 1 participants]