fix(msteams): add proactive fallback for revoked turn context#27224
Merged
steipete merged 2 commits intoopenclaw:mainfrom Mar 2, 2026
Merged
fix(msteams): add proactive fallback for revoked turn context#27224steipete merged 2 commits intoopenclaw:mainfrom
steipete merged 2 commits intoopenclaw:mainfrom
Conversation
Contributor
Greptile SummaryThis PR fixes a critical bug where MS Teams bots fail to respond when inbound messages are debounced. The Bot Framework revokes the turn context proxy before the debouncer flushes, causing The fix adds:
The implementation correctly:
Confidence Score: 5/5
Last reviewed commit: a25908f |
Fixes openclaw#27189 When an inbound message is debounced, the Bot Framework turn context is revoked before the debouncer flushes and the reply is dispatched. Any attempt to use the revoked context proxy throws a TypeError, causing the reply to fail silently. This commit fixes the issue by adding a fallback to proactive messaging when the turn context is revoked: - `isRevokedProxyError()`: New error utility to reliably detect when a proxy has been revoked. - `reply-dispatcher.ts`: `sendTypingIndicator` now catches revoked proxy errors and falls back to sending the typing indicator via `adapter.continueConversation`. - `messenger.ts`: `sendMSTeamsMessages` now catches revoked proxy errors when `replyStyle` is `thread` and falls back to proactive messaging. This ensures that replies are delivered reliably even when the inbound message was debounced, resolving the core issue where the bot appeared to ignore messages.
a25908f to
d7d9a30
Compare
Contributor
This was referenced Mar 2, 2026
mrosmarin
added a commit
to mrosmarin/openclaw
that referenced
this pull request
Mar 2, 2026
* main: (154 commits) fix: harden exec allowlist regex literal handling (openclaw#32162) (thanks @stakeswky) fix(exec): escape regex literals in allowlist path matching fix: OpenAI OAuth TLS preflight gating (openclaw#32051) (thanks @alexfilatov) Auth: gate OpenAI OAuth TLS preflight in doctor Fix TLS cert preflight classification false positive Add OpenAI OAuth TLS preflight and doctor prerequisite check fix(gateway): hot-reload channelHealthCheckMinutes without full restart refactor: harden plugin install flow and main DM route pinning fix: propagate whatsapp inbound fromMe context (openclaw#32167) (thanks @scoootscooob) fix(whatsapp): propagate fromMe through inbound message pipeline refactor: harden msteams lifecycle and attachment flows fix(config): move sensitive-schema hint warnings to debug test(perf): reduce heavy fixture and guardrail overhead perf(core): speed up routing, pairing, slack, and security scans refactor: unify queueing and normalize telegram slack flows fix: harden bundled plugin install fallback semantics (openclaw#32096) (thanks @scoootscooob) fix(plugins): prefer bundled plugin ids over bare npm specs fix: distinguish warning message for non-OpenClaw vs missing npm package fix(plugins): fall back to bundled plugin when npm spec resolves to non-OpenClaw package (openclaw#32019) fix: harden msteams revoked-context fallback delivery (openclaw#27224) (thanks @openperf) ...
dawi369
pushed a commit
to dawi369/davis
that referenced
this pull request
Mar 3, 2026
OWALabuy
pushed a commit
to kcinzgg/openclaw
that referenced
this pull request
Mar 4, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #27189
Summary
When an inbound MS Teams message is debounced (default for this channel), the Bot Framework turn context is revoked before the debouncer flushes and the reply is dispatched. Any subsequent attempt to use the revoked context proxy—to send a typing indicator or a threaded reply—throws a
TypeError, causing the reply to fail silently. From the user's perspective, the bot reads messages but never responds.This commit fixes the issue by adding a fallback to proactive messaging when the turn context is revoked. This ensures that replies are delivered reliably even when the inbound message was debounced.
Changes
extensions/msteams/src/errors.tsisRevokedProxyError()utility to reliably detect revoked proxy errors.extensions/msteams/src/reply-dispatcher.tssendTypingIndicatornow catches revoked proxy errors and falls back to sending the typing indicator viaadapter.continueConversation.extensions/msteams/src/messenger.tssendMSTeamsMessagesnow catches revoked proxy errors whenreplyStyleisthreadand falls back to proactive messaging.extensions/msteams/src/errors.test.tsisRevokedProxyError.extensions/msteams/src/messenger.test.tsHow to test
final reply failed: Cannot perform 'set' on a proxy that has been revoked.