| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
This PR ensures agent handoff cloning preserves additional_properties and adds a regression test to validate the behavior.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| python/packages/orchestrations/tests/test_handoff.py | Adds a regression test asserting additional_properties are preserved across handoff cloning. |
| python/packages/orchestrations/agent_framework_orchestrations/_handoff.py | Updates agent cloning to copy additional_properties into the cloned agent. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
…lones HandoffAgentExecutor clones each participant agent to attach handoff tools, but the clone rebuilt the Agent without forwarding additional_properties, so middleware and integrations observing context.agent.additional_properties during handoff runs saw an empty dict while the original agent retained its configuration. Pass a deepcopy of the original agent's additional_properties into the clone so handoff-executed agents keep their configured metadata and the original agent stays untouched. Fixes microsoft#7750
|
@microsoft-github-policy-service agree [company="Accenture" |
Sorry, something went wrong.
|
@microsoft-github-policy-service agree |
Sorry, something went wrong.
|
/review |
Sorry, something went wrong.
There was a problem hiding this comment.
Result: No findings
Scope: full PR (1 commit(s)): 698ba36e2812
Model: gpt-5.6-sol
The change forwards agent metadata through the handoff clone and adds coverage for middleware visibility and independent top-level ownership. Existing clone tests also protect middleware and history configuration, and the test uses the executor's public agent accessor. The only supported runtime concern is already covered by supplied review feedback, so there is no new publishable finding.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Sorry, something went wrong.
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation & Context
Agents configured with additional_properties lose those properties when executed through a handoff workflow. The same agent exposes its configured properties during a direct run, but middleware sees an empty dictionary when the agent runs through HandoffBuilder — silently breaking middleware and integrations that rely on agent metadata (tenant info, tracing tags, feature flags, etc.).
Description & Review Guide
HandoffAgentExecutor clones each participant Agent in _clone_chat_agent (to attach handoff tools without mutating the caller's agent), but the clone's Agent(...) reconstruction did not forward additional_properties. PR #5220 previously fixed middleware preservation in this same clone path; additional_properties is a separate public field that remained unpreserved.
Agents participating in handoff workflows retain their configured additional_properties; no API or behavioral changes for agents without them. Not a breaking change.
Whether a deep copy (vs. a shared reference) is the right ownership semantics for the cloned agent's metadata.
Related Issue
Fixes #7750
Contribution Checklist