-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: MS Teams inbound mentions, quoted replies, and forwards are not normalized for agent text #102376
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PR
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PR
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Microsoft Teams inbound text is not normalized before it is sent to the agent: user mentions are stripped,
quotedReply/ inline quoted markers are not converted into readable quote context, and forwarded-message payloads are not labeled as forwarded text.Steps to reproduce
activity.textincludes a Teams mention span such as<at>Example User One</at>and a matchingmentionentity.activity.textincludes a self-closing<quoted messageId="..."/>marker andactivity.entities[]includes aquotedReplyentity withsenderNameandpreview.http://schema.skype.com/Forwardblockquote.Expected behavior
The agent-facing text should preserve non-bot mentions as readable display names, remove Teams inline quote markers, keep quoted-reply preview text in the normal supplemental quote context path, and label forwarded-message payloads so the agent can distinguish forwarded content from text authored by the sender.
Actual behavior
Current
upstream/mainbuilds Teams dispatch text with:stripMSTeamsMentionTags()removes all<at>...</at>content. Current main also has noquotedReplyparser, nohttp://schema.skype.com/Forwardparser, and no mention display-name normalizer underextensions/msteams/src, so the agent receives lossy or misleading message text.OpenClaw version
upstream/mainbefore the fix, checked at30b3a7cded.Operating system
NOT_ENOUGH_INFO
Install method
NOT_ENOUGH_INFO
Model
NOT_ENOUGH_INFO
Provider / routing chain
NOT_ENOUGH_INFO
Additional provider/model setup details
NOT_ENOUGH_INFO
Logs
Screenshots, recordings, and evidence
No screenshot is available. Evidence is a sanitized patch-backed live-shape fixture set plus current-main source proof.
Impact and severity
Affected: Microsoft Teams channel users.
Severity: Medium user-visible comprehension bug.
Frequency: Always for the observed Teams shapes because current main lacks the normalizers/parsers for those inbound fields.
Consequence: The agent can receive incomplete or misleading text, including stripped user mentions, unreadable quoted reply markers, missing quoted context, or forwarded content presented as if the sender authored it.
Additional information
The local bug evidence did not include a raw gateway log excerpt or live tenant replay. The evidence is patch-backed and fixture-shaped, with private tenant values already anonymized.