-
-
Notifications
You must be signed in to change notification settings - Fork 69.7k
WhatsApp: Messages truncated on 503 disconnect during send #2983
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
When a WhatsApp Web 503 disconnect occurs while the agent is sending a reply, the message gets truncated mid-stream. The user receives a partial message with no indication it was cut off.
Observed behavior:
- Agent starts sending a multi-paragraph response
- WhatsApp Web connection drops (503 Service Unavailable)
- Gateway reconnects automatically (~3 seconds)
- User receives only partial message (e.g., just the bullet points from the middle of the response)
Log evidence:
status=503 Service Unavailable Stream Errored (unknown)
WhatsApp Web connection closed (status 503). Retry 1/12 in 2.14s…
Expected Behavior
- Messages should either be delivered completely or not at all
- If a message fails mid-send, it should be re-queued after reconnection
Suggested Solutions
- Delivery confirmation - Wait for WhatsApp delivery ACK before marking message as sent
- Pending message buffer - Queue outbound messages and retry on reconnection failure
- Atomic send - Don't stream partial content; buffer full response before sending
Environment
- Clawdbot version: npm package (latest)
- WhatsApp Web via Baileys
- Ubuntu/Linux VPS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.