Skip to content

Commit e201b46

Browse files
committed
docs(msteams): document replyStyle resolution precedence and thread context preservation
The existing replyStyle section explains the Posts-vs-Threads tradeoff but doesn't document how the value is actually resolved at send-time, nor what happens to thread-root context across configurations. Operators who hit unexpected top-level posts (e.g., requireMention=false setups, long-running agents whose proactive sends fall outside the live Bot Framework turn) have no docs-side anchor for understanding which knob to flip. Add two subsections under Reply Style: 1. Resolution precedence — channel > team > global > implicit default, plus the requireMention-derived implicit default. 2. Thread context preservation — describes that replyStyle=thread re-attaches the original thread root on outbound (live and proactive paths after #78387), with the threadId/activityId fallback for legacy stored refs. Calls out the deliberate "no thread suffix" behavior for replyStyle=top-level. Pure documentation change, no behavior or surface impact.
1 parent a35067f commit e201b46

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎docs/channels/msteams.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,27 @@ Teams recently introduced two channel UI styles over the same underlying data mo
752752
}
753753
```
754754

755+
### Resolution precedence
756+
757+
When the bot sends a reply into a channel, `replyStyle` is resolved from the most specific override down to the default. The first non-`undefined` value wins:
758+
759+
1. **Per-channel** — `channels.msteams.teams.<teamId>.channels.<conversationId>.replyStyle`
760+
2. **Per-team** — `channels.msteams.teams.<teamId>.replyStyle`
761+
3. **Global** — `channels.msteams.replyStyle`
762+
4. **Implicit default** — derived from `requireMention`:
763+
- `requireMention: true` → `thread`
764+
- `requireMention: false` → `top-level`
765+
766+
If you set `requireMention: false` globally without an explicit `replyStyle`, mentions in Posts-style channels will surface as top-level posts even when the inbound was a thread reply. Pin `replyStyle: "thread"` at the global, team, or channel level to avoid surprises.
767+
768+
### Thread context preservation
769+
770+
When `replyStyle: "thread"` is in effect and the bot was @mentioned from inside a channel thread, OpenClaw re-attaches the original thread root to the outbound conversation reference (`19:…@thread.tacv2;messageid=<root>`) so the reply lands inside the same thread. This holds for both live (in-turn) sends and proactive sends made after the Bot Framework turn context has expired (e.g., long-running agents, queued tool-call replies via `mcp__openclaw__message`).
771+
772+
The thread root is taken from the stored `threadId` on the conversation reference. Older stored references that predate `threadId` fall back to `activityId` (whatever inbound activity last seeded the conversation), so existing deployments keep working without a re-seed.
773+
774+
When `replyStyle: "top-level"` is in effect, channel-thread inbounds are intentionally answered as new top-level posts — no thread suffix is attached. This is the correct behavior for Threads-style channels; if you see top-level posts where you expected threaded replies, your `replyStyle` is set incorrectly for that channel.
775+
755776
## Attachments and images
756777

757778
**Current limitations:**

0 commit comments

Comments
 (0)