Skip to content

fix: fix cross team task handling - #1095

Merged
Roopan-Microsoft merged 1 commit into
microsoft:devfrom
Dhruvkumar-Microsoft:feat/model-changes
Jul 16, 2026
Merged

fix: fix cross team task handling#1095
Roopan-Microsoft merged 1 commit into
microsoft:devfrom
Dhruvkumar-Microsoft:feat/model-changes

Conversation

@Dhruvkumar-Microsoft

Copy link
Copy Markdown
Contributor

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:

  • Added a pre-planning team-scope classifier (_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]
  • The workflow now stores team_config and manager_chat_client for use by the scope gate, ensuring the classifier has full context.

Prompt and plan logic updates:

  • Updated the orchestration planning prompt in plan_review_helpers.py to 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.
  • Added explicit instructions to the final answer and completion check prompts for handling out-of-scope scenarios, ensuring the final message is appropriate and no agents are invoked. [1] [2]
  • Clarified the mandatory agent inclusion rule to make exceptions for out-of-scope requests per the new policy.

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?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft
Roopan-Microsoft merged commit 2ea543f into microsoft:dev Jul 16, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants