Summary
Gateway repeatedly delivers the same subagent completion announcement 100+ times over hours, despite the announcement having already been delivered successfully. The loop continues even after the source cron job is disabled/deleted, and only stops when gateway is restarted.
Steps to reproduce
- Create cron with
sessionTarget: "isolated", payload.kind: "agentTurn", delivery: { mode: "announce" }
- Cron spawns subagent (e.g., Atlas) via
sessions_spawn
- Subagent completes successfully
- Observe gateway logs: same announcement delivered repeatedly every ~60s
Expected behavior
- Subagent completes task
- Gateway delivers "subagent completed" announcement to parent agent once
- Parent agent processes announcement
- Delivery marked as complete
- Announcement expires/is cleaned up
Actual behavior
- Subagent completes task
- Gateway delivers "subagent completed" announcement to parent agent
- Parent agent processes announcement successfully
- Gateway delivers the SAME announcement again after ~60s
- Loop continues indefinitely (100+ deliveries over 3+ hours)
- Disabling/deleting source cron does NOT stop the loop
- Only gateway restart stops the loop
OpenClaw version
2026.2.14
Operating system
raspberry pi5
Install method
npm global
Logs, screenshots, and evidence
**Session transcript:** `agent:iris-assistant:cron:0b6f1aa8-2ffb-49e9-8d5c-89018bfad3b1` (session ae9b626a)
**Timeline:**
- 07:05:03 - Iris spawns Atlas
- 07:05:27 - Iris completes task, sends WhatsApp message ✅
- 07:05:31 - **First duplicate announcement**
- 07:05:31-10:32 - **100+ duplicate announcements** (same content, ~60s interval)
- 10:32:00 - Gateway restart stops loop
Impact and severity
Impact
- Gateway resources consumed by infinite announcement retry
- Log spam (1000+ lines for single incident)
- Cron appears "stuck" to users/monitoring
- Requires manual gateway restart to resolve
Root Cause Hypothesis
Gateway announcement delivery system lacks:
- Idempotency check - no tracking of which announcements have been delivered
- Delivery confirmation - no acknowledgment when parent agent processes announcement
- Expiration logic - announcements never expire, even when stale
Proposed Fix
Add to Gateway announcement delivery:
// Before delivering announcement
if (await wasAlreadyDelivered(announcement.id)) {
await expireAnnouncement(announcement.id);
return; // Skip delivery
}
// After successful delivery
await markAnnouncementAsDelivered(announcement.id);
// Periodic cleanup
await expireStuckAnnouncements({ olderThan: '5m' });
### Additional information
Workaround
Avoid delivery: { mode: "announce" } in crons that spawn subagents until this is fixed. Use sessions_send from parent agent instead (manual delivery).
Related Issues
• Possibly related to cron jobs message delivery issues
• May explain other "stuck cron" reports in community
Additional Context
• Parent agent (Iris) correctly handled all 100+ duplicates by filtering with NO_REPLY
• The subagent task itself completed successfully
• This is NOT a bug in the parent agent or subagent - they work correctly
• Bug is purely in Gateway's announcement queueing/delivery mechanism
Summary
Gateway repeatedly delivers the same subagent completion announcement 100+ times over hours, despite the announcement having already been delivered successfully. The loop continues even after the source cron job is disabled/deleted, and only stops when gateway is restarted.
Steps to reproduce
sessionTarget: "isolated",payload.kind: "agentTurn",delivery: { mode: "announce" }sessions_spawnExpected behavior
Actual behavior
OpenClaw version
2026.2.14
Operating system
raspberry pi5
Install method
npm global
Logs, screenshots, and evidence
Impact and severity
Impact
Root Cause Hypothesis
Gateway announcement delivery system lacks:
Proposed Fix
Add to Gateway announcement delivery: