-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Feature]: MSTeams channel-bound agents need opt-out from per-thread sessions #81084
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.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.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.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.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Bug type
Behavior / configuration gap
Summary
For Microsoft Teams channel-bound agents, OpenClaw currently forces channel thread replies into per-thread sessions after the #58615 fix. That is correct for many use cases, but it breaks agents that are intentionally bound to a whole Teams channel and expected to maintain a single continuous channel memory.
Concrete local example:
After the Teams thread isolation changes, inbound channel replies are routed into fragmented sessions such as:
The nested
:thread:OLD:thread:NEWshape is related to #66771, but even after that is fixed, the remaining problem is that some Teams channel agents should not be split per thread at all.Expected behavior
There should be a supported configuration option to keep a Teams channel-bound agent on the canonical channel session key for all messages in that channel, including replies inside Teams threads.
For example, a channel-bound PM agent should keep using:
instead of automatically forking into:
Actual behavior
OpenClaw currently applies Teams channel thread session isolation globally. This can fragment channel-bound agents across many thread sessions, causing the agent to appear to forget prior channel context.
In one production channel, recent inspection found:
This makes a channel-level PM agent behave like many separate thread-local agents.
Why this is not just #58615 or #66771
...:thread:OLD:thread:NEW.So the desired behavior is not “remove thread isolation”. It is “make Teams channel thread isolation configurable per channel/agent/session-binding policy”.
Proposed solution
Add an explicit policy/config option for MSTeams channel session routing, for example one of:
{ "channels": { "msteams": { "threadSessionPolicy": "thread" // current default } } }with supported values like:
thread— current behavior: Teams channel thread replies use per-thread sessionschannel— channel replies stay on the canonical channel sessionOr, if this belongs in the existing session/thread binding config, expose it there with enough granularity to apply to channel-bound agents only.
A local hotfix that restored the desired behavior was:
That is not proposed as the global default, only as the behavior needed behind an opt-in config/policy.
Impact
For Teams channels where OpenClaw acts as a project-management or operations agent, fragmenting by Teams thread loses the intended shared channel memory. Users experience this as the agent “forgetting” instructions, project context, and prior channel decisions.
This is especially painful for long-lived channel agents used for project coordination.
Version / environment
Observed locally after update to:
The behavior was initially expected to be fixed around
2026.4.9, but that fix addressed #58615 by adding thread isolation. This issue asks for a supported way to opt out of that isolation for channel-level agents.Related issues / PRs