-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
needs-more-infoWaiting for a reply/more info from the authorWaiting for a reply/more info from the author
Description
Please read this first
- Have you read the docs?Agents SDK docs
- Have you searched for related issues? Others may have faced similar issues.
Describe the bug
A clear and concise description of what the bug is.
Debug information
- Agents SDK version: 0.5.1
- Python version: 3.11.14
Repro steps
Create a list of handoff with diff agent and diff on_handoff.
Since in handoff we pass the agent from outer function to the inner function and passing it around. But because of the below issue even though there are different Handoff Objects they are overwriting whatever value was set in the previous run.
https://www.reddit.com/r/ProgrammingLanguages/comments/bxxx7x/python_closures_are_capturing_by_reference_should/#:~:text=Languages%20with%20closures%20always%20capture,used
Ideally provide a minimal python script that can be run to reproduce the bug.
Expected behavior
A clear and concise description of what you expected to happen.
Metadata
Metadata
Assignees
Labels
needs-more-infoWaiting for a reply/more info from the authorWaiting for a reply/more info from the author