Summary
Cron sessions are created with incomplete deliveryContext — missing to and accountId fields — even when the cron job config has a valid delivery.to value. This causes repeated delivery failures when sub-agents try to announce back to the parent cron session.
Observed Behavior
Cron job b425e29a ("Overnight Work Queue") is configured with:
"delivery": {"mode": "announce", "channel": "slack", "to": "channel:C0AAP72R7L5"}
But the persistent session agent:tim:cron:b425e29a-... stored in sessions.json has:
"deliveryContext": {"channel": "slack"}
Note the missing to and accountId fields. When sub-agents spawned from this cron session try to announce completion back to the parent, delivery fails:
Error: Delivering to Slack requires target <channelId|user:ID|channel:ID> cached=true
This error fires repeatedly (multiple times per second) as each sub-agent tries to announce.
Affected Jobs / Scope
All cron jobs that run in isolated sessions with delivery.mode = "announce" are affected. The to field from the job config is not propagated to the session deliveryContext when the session is created or updated.
Jobs that were erroring due to this bug:
aff385fe — Pre-Bedtime Check (main)
9b51578b — workq Progress Check (tim)
2d8ad3fe — C-Suite Morning Sync (amadeus)
a2f73546 — Joey Product Standup (joey)
- Xavier's "Instruction Triage" cron (active, repeated failures)
Root Cause
When the gateway creates or resumes a cron session, it correctly sets deliveryContext.channel from the job's delivery.channel field, but does not copy delivery.to → deliveryContext.to or set deliveryContext.accountId.
The relevant path is likely in the gateway's cron session creation/resume logic.
Expected Behavior
deliveryContext should mirror the job's delivery config:
"deliveryContext": {
"channel": "slack",
"to": "channel:C0AAP72R7L5",
"accountId": "default"
}
Workaround Applied
As a temporary fix, directly patched all sessions.json files across all agent directories to add to: "channel:C0AAP72R7L5" and accountId: "default" to all cron session deliveryContext entries that were missing them (~157 entries across 6 agent directories).
Additionally fixed 2 cron jobs that had channel: "last" (which never resolves for isolated cron sessions):
562e1d76 — Julia Org Health Check
1ae111ea — Context Watchdog
Both updated via openclaw cron edit --channel slack --to "channel:C0AAP72R7L5".
Code Location
Likely in gateway cron session creation/resume logic. The fix should ensure delivery.to is always propagated to session deliveryContext.to when the session is created and on every cron run start.
Summary
Cron sessions are created with incomplete
deliveryContext— missingtoandaccountIdfields — even when the cron job config has a validdelivery.tovalue. This causes repeated delivery failures when sub-agents try to announce back to the parent cron session.Observed Behavior
Cron job
b425e29a("Overnight Work Queue") is configured with:But the persistent session
agent:tim:cron:b425e29a-...stored insessions.jsonhas:Note the missing
toandaccountIdfields. When sub-agents spawned from this cron session try to announce completion back to the parent, delivery fails:This error fires repeatedly (multiple times per second) as each sub-agent tries to announce.
Affected Jobs / Scope
All cron jobs that run in isolated sessions with
delivery.mode = "announce"are affected. Thetofield from the job config is not propagated to the sessiondeliveryContextwhen the session is created or updated.Jobs that were erroring due to this bug:
aff385fe— Pre-Bedtime Check (main)9b51578b— workq Progress Check (tim)2d8ad3fe— C-Suite Morning Sync (amadeus)a2f73546— Joey Product Standup (joey)Root Cause
When the gateway creates or resumes a cron session, it correctly sets
deliveryContext.channelfrom the job'sdelivery.channelfield, but does not copydelivery.to→deliveryContext.toor setdeliveryContext.accountId.The relevant path is likely in the gateway's cron session creation/resume logic.
Expected Behavior
deliveryContextshould mirror the job'sdeliveryconfig:Workaround Applied
As a temporary fix, directly patched all
sessions.jsonfiles across all agent directories to addto: "channel:C0AAP72R7L5"andaccountId: "default"to all cron sessiondeliveryContextentries that were missing them (~157 entries across 6 agent directories).Additionally fixed 2 cron jobs that had
channel: "last"(which never resolves for isolated cron sessions):562e1d76— Julia Org Health Check1ae111ea— Context WatchdogBoth updated via
openclaw cron edit --channel slack --to "channel:C0AAP72R7L5".Code Location
Likely in gateway cron session creation/resume logic. The fix should ensure
delivery.tois always propagated to sessiondeliveryContext.towhen the session is created and on every cron run start.