Problem
Slack delivers both message and app_mention events for the same @mention in channels, with no guaranteed delivery order. OpenClaw's dedup cache uses the same channelId:ts key for both event types — whichever arrives first marks the message as seen, and the second is silently dropped.
When message arrives first in a channel with requireMention: true:
message event is dropped by the requireMention check (no mention flag) — but the dedup key is still set
app_mention event arrives with wasMentioned: true — silently deduped
Result
- ~50% of @mentions in channels are silently ignored
- Thread context never established (
threadTsResolver.resolve never runs)
invalid_thread_ts errors on reply → fallback to main channel
Reproduction
This is timing-dependent. In a multi-agent Slack setup where agents @mention each other in channels, approximately half of mentions are dropped. Slack provides no ordering guarantees between message and app_mention (confirmed by Slack team).
Proposed Fix
Exempt app_mention events from the dedup check in message-handler.ts. This is safe because:
- The downstream debouncer already handles dedup at the flush level via
buildKey
prepareSlackMessage correctly merges wasMentioned across debounced entries
Related
Problem
Slack delivers both
messageandapp_mentionevents for the same @mention in channels, with no guaranteed delivery order. OpenClaw's dedup cache uses the samechannelId:tskey for both event types — whichever arrives first marks the message as seen, and the second is silently dropped.When
messagearrives first in a channel withrequireMention: true:messageevent is dropped by therequireMentioncheck (no mention flag) — but the dedup key is still setapp_mentionevent arrives withwasMentioned: true— silently dedupedResult
threadTsResolver.resolvenever runs)invalid_thread_tserrors on reply → fallback to main channelReproduction
This is timing-dependent. In a multi-agent Slack setup where agents @mention each other in channels, approximately half of mentions are dropped. Slack provides no ordering guarantees between
messageandapp_mention(confirmed by Slack team).Proposed Fix
Exempt
app_mentionevents from the dedup check inmessage-handler.ts. This is safe because:buildKeyprepareSlackMessagecorrectly mergeswasMentionedacross debounced entriesRelated
a1ee60549— fixes a different issue: duplicate DM processing. That fix skipsapp_mentionforim/mpimchannels. This issue is about channel mentions being dropped by the dedup cache.