-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Summary
Bug: MS Teams replies fail with "Cannot perform 'set' on a proxy that has been revoked"
Description
The MS Teams extension consistently fails to deliver replies to users with the error:
[msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
Moneypenny (the AI assistant) receives inbound Teams messages and processes them correctly, but the reply never reaches the user. From the user's perspective, the bot appears to read messages but never responds. When asked about it, the AI believes it already replied successfully.
Environment
- OpenClaw version: 2026.2.15 (3fe22ea)
- MS Teams extension version: 2026.2.24 (
@openclaw/msteams) - Node.js: v22.22.0
- OS: Ubuntu 24.04 LTS
- Hardware: Dell Edge Gateway 5200
Steps to Reproduce
- Configure the
channels.msteamssection inopenclaw.jsonwith valid Bot Framework credentials (appId, appPassword, tenantId, webhook) - Send a DM to the bot via Microsoft Teams
- Observe that the bot receives and processes the message (visible in logs)
- The reply fails silently — the user never receives a response
Expected Behavior
The bot should deliver its AI-generated reply back to the Teams conversation.
Actual Behavior
The reply fails with:
[msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
[msteams] final reply failed: Cannot perform 'get' on a proxy that has been revoked
The AI processes the message and generates a response, but the delivery mechanism fails because the Bot Framework turn context has been revoked by the time the reply is dispatched.
Root Cause Analysis
After tracing through the extension source code, the issue appears to be in the interaction between the inbound debouncer and the Bot Framework turn context lifecycle.
The flow:
monitor-handler.tsregisters anonMessagehandler that callshandleTeamsMessage()handleTeamsMessage()inmessage-handler.tsenqueues the message into an inbound debouncer viainboundDebouncer.enqueue()- The Bot Framework
onMessagehandler returns (completing the turn) - The Bot Framework SDK revokes the turn context proxy after the turn completes
- The debouncer's
onFlushcallback fires and callshandleTeamsMessageNow() handleTeamsMessageNow()creates a reply dispatcher that passes the now-revokedcontextobject tosendMSTeamsMessages()inmessenger.ts- The send attempt fails because the proxy has been revoked
Key code path:
onMessage handler
→ handleTeamsMessage()
→ inboundDebouncer.enqueue({ context, ... })
→ [turn completes, context proxy revoked]
→ onFlush fires
→ handleTeamsMessageNow({ context: REVOKED_PROXY, ... })
→ createMSTeamsReplyDispatcher({ context: REVOKED_PROXY, ... })
→ sendMSTeamsMessages({ context: REVOKED_PROXY, ... })
→ 💥 Cannot perform 'set' on a proxy that has been revoked
The core issue:
The reply dispatcher in reply-dispatcher.ts (line ~70) passes the live context object to sendMSTeamsMessages(). However, by the time the AI generates a response and the dispatcher attempts to send it, the Bot Framework SDK has already revoked the turn context.
The extension does store conversation references via conversationStore.upsert() in message-handler.ts (line ~270), and send-context.ts has a full resolveMSTeamsSendContext() function for proactive messaging. However, the reply path uses the turn context instead of the stored conversation reference for proactive messaging.
Attempted Workarounds (None Worked)
| Attempt | Result |
|---|---|
| Set debounceMs: 0 on channels.msteams | Unrecognized key: "debounceMs" — not in the channel config schema |
| Set responseModel to a faster model on channels.msteams | Unrecognized keys: "responseModel", "responseTimeoutMs" — not in schema |
| Remove duplicate plugin entry from plugins.entries | Eliminated duplicate warning but proxy error persists |
Suggested Fix
The reply dispatcher should use proactive messaging via the stored conversation reference (which already works — send-context.ts + conversation-store-fs.ts) instead of relying on the turn context, which is invalidated after the turn completes. This is the standard Bot Framework pattern for scenarios where the response is not immediate.
Alternatively, the debouncer's onFlush should keep the turn alive by awaiting the full AI response cycle within the turn handler before returning, ensuring the context remains valid throughout the reply.
Logs
2026-02-26T04:00:51.817Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:03:23.593Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:03:23.596Z [msteams] final reply failed: Cannot perform 'get' on a proxy that has been revoked
2026-02-26T04:03:50.347Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:04:26.741Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:06:55.846Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:07:42.802Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:07:42.804Z [msteams] final reply failed: Cannot perform 'get' on a proxy that has been revoked
2026-02-26T04:09:17.740Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
These errors repeat on every inbound message. No successful replies were observed.
Additional Context
- The WhatsApp and Voice Call plugins on the same OpenClaw instance work correctly
- WhatsApp has
debounceMs: 0set in its channel config, which may be why it doesn't hit this issue - The MS Teams channel config schema does not accept
debounceMsas a valid property - The extension was released on 2026-02-24 (one day before this issue was discovered)
Steps to reproduce
Send msbot question, bot replys but if that question required a followup the bot does not reply but thinks it did
Expected behavior
I should get a reply to followups
Actual behavior
bot thinks it replied
OpenClaw version
2026.2.15 (3fe22ea)
Operating system
Ubuntu 24.04 LTS
Install method
npm
Logs, screenshots, and evidence
2026-02-26T04:00:51.817Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:03:23.593Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:03:23.596Z [msteams] final reply failed: Cannot perform 'get' on a proxy that has been revoked
2026-02-26T04:03:50.347Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:04:26.741Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:06:55.846Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:07:42.802Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revoked
2026-02-26T04:07:42.804Z [msteams] final reply failed: Cannot perform 'get' on a proxy that has been revoked
2026-02-26T04:09:17.740Z [msteams] final reply failed: Cannot perform 'set' on a proxy that has been revokedImpact and severity
affected teams usage
Additional information
No response