Skip to content

Subagent announce retry too short — fails silently on transient WhatsApp disconnects #46081

@daxfdr

Description

@daxfdr

Summary

Subagent announce completions fail silently when the WhatsApp (Baileys) listener experiences a brief disconnection. The current retry strategy (4 attempts over ~40 seconds) is insufficient for transient outages that resolve within 1-2 minutes.

Steps to Reproduce

  1. Have a sub-agent running a task (e.g. sessions_spawn with mode: "run")
  2. During execution, trigger a WhatsApp Web reconnection (e.g. opening WhatsApp Web on another device can cause Baileys to briefly disconnect)
  3. Sub-agent completes and attempts to announce the result

Expected Behavior

The announce should eventually be delivered once the WhatsApp listener reconnects (within seconds to a few minutes).

Actual Behavior

The announce retries 4 times over ~40 seconds, all fail with:

Error: No active WhatsApp Web listener (account: default)

After 4 retries, the announce is permanently dropped. The result reaches the main agent internally but is never delivered to the user via WhatsApp. The user has no way of knowing the task completed.

Logs

08:43:33 [warn] Subagent announce completion direct announce agent call transient failure, retrying 2/4 in 5s
08:43:38 [warn] ... retrying 3/4 in 10s
08:43:49 [warn] ... retrying 4/4 in 20s
08:44:07 Subagent completion direct announce failed for run dbaf02c6...

The WhatsApp listener reconnected on its own shortly after (~08:45), and normal message delivery resumed — but the announce was already abandoned.

Suggested Fix

  • Longer backoff: Extend retry to 5-6 attempts with exponential backoff up to 5 minutes total
  • Re-enqueue on channel recovery: When the WhatsApp listener reconnects, check for any pending/failed announces and re-deliver them
  • Fallback delivery: If the original channel fails after all retries, attempt delivery via an alternative channel (e.g. webchat) or queue for next heartbeat

Environment

  • OpenClaw version: 2026.3.13
  • Channel: WhatsApp (Baileys)
  • Gateway mode: local
  • OS: WSL2 (Ubuntu)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions