Copilot Studio Friction
Wrong topic fires after "End all topics"
Last verified
Details & related
Assessment
- Confidence
- CorroboratedMultiple independent sources describe the same behaviour.
- Severity
- Degrading
- Typical time lost
- Hours
Identification
Verification & changes
Verified
Doc check by human: Q&A thread and official variable-lifecycle and system-topics docs re-read during seed migration; behavior and workaround still documented.
Change
Provisionally approved by the Product Owner; external LLM quality review pending.
Change
Initial record created from the seed dossier (migration wave 1).
Are you in the right place?
- A topic ends with an "End all topics" node.
- The user's next message triggers the wrong topic, or an unexpected answer source.
- The expected topic works when you trigger it directly in a fresh conversation.
- The misrouting may have started without any change on your side.
If the topic breaks off mid-question → see Agent jumps out of the topic mid-question. If topic-keeping broke suddenly around a platform update → see Agent suddenly stops staying in the topic.
What's happening
"End all topics" stops every active topic — but it does not clean up. Global variables keep their values until the session ends or a "Clear Variable Value" node runs. That leftover state stays behind as residue. On the next message, residual variables, system topics, or generative orchestration can override the trigger you expect. Think of a meeting room where the last group left their notes on the whiteboard. The next group reads those notes and starts the wrong discussion. Clearing the variables wipes the whiteboard before the room is handed over.
For technicians
A Microsoft Q&A answer from December 2025 documents the misrouting and its cause. "End all topics" stops active topics but leaves global variables untouched. The official variable lifecycle confirms it: globals persist until session end or an explicit clear. The asker reported the routing had worked days earlier without maker changes — a documented case of platform drift. When routing changes without your action, check release notes and community threads before rebuilding.
How to fix it
Solution 1
Community workaroundClear variables before you end the topics
- Open the topic that contains the "End all topics" node.
- Select "+" directly before the "End all topics" node.
- Select "Topic management" → "Clear all variables".
- Decide whether the conversation should end completely at this point.
- If yes, add "Topic management" → "End conversation" after the clear node.
- Save the topic.
- Test the handover in the test pane.
✅ You should now see: after "End all topics", the next message triggers the intended topic.
Solution 2
Community workaroundCopy the reset pattern from the "Reset Conversation" system topic
- In your agent, open "Topics" and switch to the "System" tab.
- Open the "Reset Conversation" system topic.
- Note its node order: it clears all variable values, then restarts the conversation.
- Rebuild that order at the end of your own topic.
✅ You should now see: your topic ends with the same clean reset the system topic uses.
Check that it worked
Run the full path in the test pane: enter the topic, reach "End all topics", then answer. Send the next message. Expected: it triggers the topic you designed for it, not a leftover route.
If it didn't work
- A global variable still carries state. "Clear all variables" only helps where you placed it. Confirm it sits before "End all topics", not after.
- Generative orchestration reroutes the message. With orchestration active, the planner may pick another topic regardless of residue. Test the same path with classic orchestration to isolate this.
- A system topic intercepts the message. Check "Fallback" and other system topics for matching triggers.
- The published channel lags behind. Publish and propagation delay is suspect number one. See Teams answers with an old version of your agent.
Prevent it next time
- End every topic that hands over control with the pair: clear variables first, then end topics.
- Document which topic sets, reads, and clears each global variable — an ownership note per variable.
- Investigate sudden routing changes as possible platform drift before you rebuild topics.
Evidence
Community threadlearn.microsoft.com
After 'End all topics', the next message triggers the wrong topic; the answer blames uncleared globals and residual state and recommends 'Clear all variables'.
Official documentationlearn.microsoft.com
Global variables keep their value until the session ends or a 'Clear Variable Value' node resets them.
Official documentationlearn.microsoft.com
The system-topics reference documents a built-in 'Reset Conversation' topic that clears all variable values.