-
-
Notifications
You must be signed in to change notification settings - Fork 69.4k
Discord: Duplicate messages being sent (double send) #3549
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Summary
Messages are being sent twice to Discord channels, resulting in duplicate messages with the same content appearing approximately 0.3-1 seconds apart.
Environment
- Clawdbot version: 2026.1.24-3
- Platform: Ubuntu (VPS)
- Discord channel: Using GLM-4.7 (z.ai) as the model
- Node.js: 22.22.0
Reproduction
- Send any message to an Elma agent in a Discord channel
- Observe that the response is sent twice with different message IDs
Evidence from Discord API
Messages retrieved via Discord API show duplicate sends:
ID:1466146796693749955 - timestamp: 2026-01-28T19:03:56.022
ID:1466146794655449260 - timestamp: 2026-01-28T19:03:55.536 (same content!)
ID:1466146772618317857 - timestamp: 2026-01-28T19:03:50.282
ID:1466146771460821246 - timestamp: 2026-01-28T19:03:50.006 (same content!)
Logs
- The Clawdbot logs show only ONE
embedded run start/endper message - However, verbose logging showed the same streaming text being emitted many times with sequential
aseqnumbers - No duplicate
lane enqueueentries visible
Attempted fixes
- Service restart - did not help
blockStreaming: truein Discord config - caused API to hang completely (no messages sent)
Additional context
- Discord Gateway connection was also unstable earlier (multiple
WebSocket connection closed with code 1005errors) - After fixing the WebSocket issues, duplicate sending persists
- The issue appears to be in the streaming output processing where the same chunk gets sent to Discord twice
Expected behavior
Each message should be sent only once to Discord.
Actual behavior
Each message is sent twice, approximately 0.3-1 second apart, with different Discord message IDs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.