Bug Report: MSTeams Channel Replies Not Being Sent
Reporter: [REDACTED]
Date: 2026-02-05
OpenClaw Version: 2026.2.1
Platform: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2, x64)
Node Version: v22.22.0
Affected Plugin: /mnt/e/openclaw/extensions/msteams/
Summary
Agent successfully processes Microsoft Teams channel messages and generates replies, but replies are never sent back to Teams channels. DM replies work correctly. This is a critical bug affecting all Teams channel interactions.
Environment
- OpenClaw: 2026.2.1
- Runtime: WSL2 on Windows
- Agent: [Bot Name] (main agent)
- Model: anthropic/claude-sonnet-4-5 (primary), openai-codex/gpt-5.2 (fallback)
- Teams App ID: [REDACTED-APP-ID]
- Tenant ID: [REDACTED-TENANT-ID]
Problem Description
Primary Issue (Critical)
When a user @mentions the bot in a Teams channel, the message is received and processed, the agent generates a reply, but the reply is never sent back to Teams. No errors are logged.
Secondary Issue
Messages without @mentions are routed to the DM session instead of the channel session, despite groupPolicy: "open" and requireMention: false being set.
Steps to Reproduce
Setup
- Install bot to a Teams team
- Configure gateway with:
{
"channels": {
"defaults": {
"groupPolicy": "open"
},
"msteams": {
"enabled": true,
"groupPolicy": "open",
"teams": {
"[REDACTED-TEAM-ID]": {
"replyStyle": "top-level"
}
}
}
}
}
Reproduce Bug
- In Teams channel, post:
@[botname] test message
- Wait for processing to complete
- Expected: Bot replies in the channel
- Actual: No reply appears in Teams
Diagnostic Evidence
Log Evidence (from /tmp/openclaw/openclaw-2026-02-05.log)
Message Received Successfully
2026-02-05T19:11:55.260Z [msteams] received message
2026-02-05T19:11:56.451Z [msteams] dispatching to agent
2026-02-05T19:11:57.815Z [diagnostic] lane enqueue: lane=session:agent:main:msteams:channel:[REDACTED-CONVERSATION-ID]@thread.tacv2
Agent Processing Completed
2026-02-05T19:11:57.843Z [agent/embedded] embedded run start: runId=af20ba96-03d1-4de2-9e98-9636444e5434 sessionId=f490c738-8c0e-426b-a7b6-5941fdf15921 messageChannel=msteams
2026-02-05T19:12:04.653Z [agent/embedded] embedded run agent end
2026-02-05T19:12:04.680Z [agent/embedded] embedded run done: durationMs=6839 aborted=false
2026-02-05T19:12:06.362Z [msteams] dispatch complete
NO Send Activity ❌
- Expected: Log entries like
msteams:send or sending proactive message
- Actual: None found in logs around timestamp 19:12:04-19:12:07
Comparison: Working DM Send (for reference)
2026-02-05T17:13:28.603Z [msteams:send] sending proactive message
2026-02-05T17:13:29.970Z [msteams:send] sent proactive message
Session History Evidence
Query: sessions_history(sessionKey="agent:main:msteams:channel:[REDACTED-CONVERSATION-ID]@thread.tacv2")
User message:
[2026-02-05 14:11:55 EST] test message
Agent reply (generated but never sent):
Great! This message came through **without** a mention — so the mention gate fix is working now!
Did you also fix the image issue? Want to test sending me an image to see if I can now see it?
Delivery context in session:
{
"deliveryContext": {
"channel": "msteams",
"to": "conversation:[REDACTED-CONVERSATION-ID]@thread.tacv2",
"accountId": "default"
}
}
Expected vs Actual Behavior
| Context |
Expected |
Actual |
Status |
| DM to bot |
Message received → Reply sent |
✅ Works correctly |
✅ PASS |
| Channel @mention |
Message received → Reply sent |
❌ Reply generated but not sent |
❌ FAIL |
| Channel no mention |
Message received by channel session |
❌ Routes to DM session instead |
❌ FAIL |
Additional Context
What We Tried (All Failed)
- ✅ Verified bot has correct manifest scopes:
["personal", "team", "groupChat"]
- ✅ Added Microsoft Graph permission
Group.Read.All with admin consent
- ✅ Set
groupPolicy: "open" in both channels.defaults and channels.msteams
- ✅ Added team by ID and by name to allowlist
- ✅ Set
requireMention: false at team level
- ✅ Removed tool restrictions that might interfere
- ✅ Set
replyStyle: "top-level" for the team
- ✅ Multiple gateway restarts
- ✅ Verified Graph API team resolution working
None of these resolved the channel reply issue.
Key Observations
- DMs work perfectly - send logs appear, replies are delivered
- Channel processing works - messages are received, agent runs successfully
- Reply generation works - session history shows valid replies created
- Reply delivery fails silently - no send attempt logged, no errors, no timeout
This suggests the bug is in the conversation reference handling or proactive messaging logic specifically for channel conversations in /mnt/e/openclaw/extensions/msteams/.
Relevant Files
- Plugin:
/mnt/e/openclaw/extensions/msteams/
- Source file (suspected):
/mnt/e/openclaw/extensions/msteams/src/monitor-handler/message-handler.ts
- Logs:
/tmp/openclaw/openclaw-2026-02-05.log
Teams Channel Details
- Team Name: [My Team]
- Team ID:
[REDACTED-TEAM-ID]
- Channel Name: General
- Conversation ID:
[REDACTED-CONVERSATION-ID]@thread.tacv2
- Channel Type: Appears to be "Threads" style (not classic "Posts")
- Session Key:
agent:main:msteams:channel:[REDACTED-CONVERSATION-ID]@thread.tacv2
Suspected Root Cause
The MSTeams plugin likely:
- ✅ Correctly stores conversation reference when receiving channel messages
- ✅ Correctly routes to channel-specific session
- ❌ Fails to use stored conversation reference when sending replies back
Possible issues:
- Conversation reference not being passed to send logic
- Reply delivery code path missing for channel conversations
- Bug in proactive messaging for threaded conversations (
@thread.tacv2)
- Silent error swallowing in send path
Workaround
Current: Bot works correctly for DMs only. Channel interactions are non-functional.
Impact
Severity: HIGH
Impact: Complete inability to use bot in Teams channels (only DMs work)
This blocks:
- Team collaboration use cases
- Multi-user channel assistance
- Public/shared bot interactions in Teams
Attachments
- Full config: Available upon request (contains sensitive credentials)
- Session transcript: Available via
sessions_history for sessionId f490c738-8c0e-426b-a7b6-5941fdf15921
- Logs:
/tmp/openclaw/openclaw-2026-02-05.log (entries 2904-2924 for failing message)
Contact
Reporter: [REDACTED]
Available for testing/follow-up
Generated: 2026-02-05 14:57 EST
Session ID: 06f7f265-ebfb-4a1b-a616-3aa007ef42a6
Bug Report: MSTeams Channel Replies Not Being Sent
Reporter: [REDACTED]
Date: 2026-02-05
OpenClaw Version: 2026.2.1
Platform: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2, x64)
Node Version: v22.22.0
Affected Plugin:
/mnt/e/openclaw/extensions/msteams/Summary
Agent successfully processes Microsoft Teams channel messages and generates replies, but replies are never sent back to Teams channels. DM replies work correctly. This is a critical bug affecting all Teams channel interactions.
Environment
Problem Description
Primary Issue (Critical)
When a user @mentions the bot in a Teams channel, the message is received and processed, the agent generates a reply, but the reply is never sent back to Teams. No errors are logged.
Secondary Issue
Messages without @mentions are routed to the DM session instead of the channel session, despite
groupPolicy: "open"andrequireMention: falsebeing set.Steps to Reproduce
Setup
{ "channels": { "defaults": { "groupPolicy": "open" }, "msteams": { "enabled": true, "groupPolicy": "open", "teams": { "[REDACTED-TEAM-ID]": { "replyStyle": "top-level" } } } } }Reproduce Bug
@[botname] test messageDiagnostic Evidence
Log Evidence (from
/tmp/openclaw/openclaw-2026-02-05.log)Message Received Successfully
Agent Processing Completed
NO Send Activity ❌
msteams:sendorsending proactive messageComparison: Working DM Send (for reference)
Session History Evidence
Query:
sessions_history(sessionKey="agent:main:msteams:channel:[REDACTED-CONVERSATION-ID]@thread.tacv2")User message:
Agent reply (generated but never sent):
Delivery context in session:
{ "deliveryContext": { "channel": "msteams", "to": "conversation:[REDACTED-CONVERSATION-ID]@thread.tacv2", "accountId": "default" } }Expected vs Actual Behavior
Additional Context
What We Tried (All Failed)
["personal", "team", "groupChat"]Group.Read.Allwith admin consentgroupPolicy: "open"in bothchannels.defaultsandchannels.msteamsrequireMention: falseat team levelreplyStyle: "top-level"for the teamNone of these resolved the channel reply issue.
Key Observations
This suggests the bug is in the conversation reference handling or proactive messaging logic specifically for channel conversations in
/mnt/e/openclaw/extensions/msteams/.Relevant Files
/mnt/e/openclaw/extensions/msteams//mnt/e/openclaw/extensions/msteams/src/monitor-handler/message-handler.ts/tmp/openclaw/openclaw-2026-02-05.logTeams Channel Details
[REDACTED-TEAM-ID][REDACTED-CONVERSATION-ID]@thread.tacv2agent:main:msteams:channel:[REDACTED-CONVERSATION-ID]@thread.tacv2Suspected Root Cause
The MSTeams plugin likely:
Possible issues:
@thread.tacv2)Workaround
Current: Bot works correctly for DMs only. Channel interactions are non-functional.
Impact
Severity: HIGH
Impact: Complete inability to use bot in Teams channels (only DMs work)
This blocks:
Attachments
sessions_historyfor sessionIdf490c738-8c0e-426b-a7b6-5941fdf15921/tmp/openclaw/openclaw-2026-02-05.log(entries 2904-2924 for failing message)Contact
Reporter: [REDACTED]
Available for testing/follow-up
Generated: 2026-02-05 14:57 EST
Session ID: 06f7f265-ebfb-4a1b-a616-3aa007ef42a6