Description
When receiving DM messages via Microsoft Teams, each inbound message appears twice in the agent's session context. The duplicate shows up as a "Queued" message replayed after the agent finishes processing the first delivery.
Reproduction
- Configure msteams channel with DM enabled
- Send a message to the bot while it's processing a previous turn (or even when idle — timing-dependent)
- Observe the agent session: the same message text appears twice, once as the direct inbound and once as a queued replay
Example
System: [2026-04-14 10:00:12 PDT] Teams DM from John Lian: what is the active memory plugin?
...agent processes and replies...
[Queued messages while agent was busy]
Queued #1 (from John Lian)
System: [2026-04-14 10:00:12 PDT] Teams DM from John Lian: what is the active memory plugin?
Same message ID, same timestamp, same content — delivered twice.
Impact
- Agent sees and sometimes responds to the same message twice
- Token waste from processing duplicate context
- Confusing conversation flow
Environment
- OpenClaw v2026.4.14
- msteams plugin (bundled)
blockStreaming: false (also happened with true)
- DM (personal) conversation type
- Queue mode: default (no explicit
messages.queue.byChannel.msteams set)
History
In v2026.3.13, this was caused by the msteams plugin firing both a system event AND the channel message for every DM. We patched it locally with an if (!isDirectMessage) guard on the system event path. The system event code path appears to have been removed in later versions, but the duplication persists through a different mechanism (possibly the collect/followup queue replay).
Expected behavior
Each inbound DM should appear exactly once in the agent's session context.
Description
When receiving DM messages via Microsoft Teams, each inbound message appears twice in the agent's session context. The duplicate shows up as a "Queued" message replayed after the agent finishes processing the first delivery.
Reproduction
Example
Same message ID, same timestamp, same content — delivered twice.
Impact
Environment
blockStreaming: false(also happened withtrue)messages.queue.byChannel.msteamsset)History
In v2026.3.13, this was caused by the msteams plugin firing both a system event AND the channel message for every DM. We patched it locally with an
if (!isDirectMessage)guard on the system event path. The system event code path appears to have been removed in later versions, but the duplication persists through a different mechanism (possibly the collect/followup queue replay).Expected behavior
Each inbound DM should appear exactly once in the agent's session context.