fix: fix cross team task handling - #1095
Merged
Roopan-Microsoft merged 1 commit intoJul 16, 2026
Merged
Conversation
Dhruvkumar-Microsoft
requested review from
Avijit-Microsoft,
Fr4nc3,
Roopan-Microsoft,
aniaroramsft,
dgp10801,
nchandhi and
toherman-msft
as code owners
July 16, 2026 13:11
Roopan-Microsoft
approved these changes
Jul 16, 2026
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.
Purpose
This pull request introduces a robust "team-scope gate" to the orchestration workflow, ensuring that user requests are first classified as in-scope or out-of-scope for the selected team's agents before planning or execution proceeds. If a request is out of scope, the system now halts normal agent planning and instead presents a single MagenticManager step to inform the user, requiring explicit approval. The orchestration prompt and plan review logic are also updated to reflect this policy, ensuring consistent handling and messaging throughout.
Team-scope gate implementation:
_evaluate_team_scope) that uses the manager chat client and team configuration to decide if a request is within the team's domain. If out-of-scope, the system presents an approval step and sends a user notice instead of running agents. [1] [2]team_configandmanager_chat_clientfor use by the scope gate, ensuring the classifier has full context.Prompt and plan logic updates:
plan_review_helpers.pyto clearly state the team-scope policy, instructing that out-of-scope requests must result in a single MagenticManager step and not invoke any domain agents.These changes ensure that the orchestration system robustly enforces team boundaries, improves user guidance for out-of-scope requests, and maintains clear, auditable logic for all planning and execution flows.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information