-
-
Notifications
You must be signed in to change notification settings - Fork 39.7k
Closed
Description
Problem
When a cron job uses delivery.mode = "announce" without an explicit to recipient (relying on last-session target resolution via channel: "last"), delivery never triggers.
Current Behavior
The delivery logic requires an explicit to field to request delivery. Jobs configured like this won't deliver:
job.delivery = { mode: "announce", channel: "last" } // no "to", expects last-session resolutionRoot Cause
There's a resolveCronDeliveryPlan() function in src/cron/delivery.ts that correctly handles this:
if (hasDelivery) {
return {
requested: resolvedMode === "announce", // true regardless of "to"
...
};
}However, this function was added but never integrated into the execution path. It's dead code.
Proposed Solution
Wire up resolveCronDeliveryPlan() into the cron isolated agent runner, or extract its logic into the wrapper.
Notes
All existing tests use announce mode with explicit to, so this scenario was never covered.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels