Closed
Description
- Package Name: azure-ai-projects (agent service)
- Package Version: 1.0.0b8
- Operating System:
- Python Version: 3.13
Describe the bug
Getting 'ERROR:asyncio: Unclosed client session' after deleting thread and agent. When running the agent application in debug mode (F5) the issue doesn't occur. It looks like the destructor for the sdk is not cleaning up properly.
The error doesn't prevent the app to run smoothly.
To Reproduce
Steps to reproduce the behavior:
- Open the agent solution in a codespace or dev container https://github.com/microsoft/build-your-first-agent-with-azure-ai-agent-service-workshop
- Follow the instructions to enable function calling https://github.com/microsoft/build-your-first-agent-with-azure-ai-agent-service-workshop/blob/main/docs/docs/lab-1-function_calling.md
- Execute the app (run src/python/workshop/main.py)
- Type exit to cleanup the agent and you'll get the error.
- Try executing the app in debug mode (F5) and see the difference.
Expected behavior
I would expect the same behaviour when running the app in debug mode and in 'default mode', which means not getting the error (screenshot below).
Screenshots
Additional context
The application in the linked repo (https://github.com/microsoft/build-your-first-agent-with-azure-ai-agent-service-workshop/) is a sample of an agent built with Azure AI Agent service using Python.
Metadata
Metadata
Assignees
Labels
This issue points to a problem in the data-plane of the library.Workflow: This issue is responsible by Azure service team.Issues that are reported by GitHub users external to the Azure organization.Workflow: This issue needs attention from Azure service team or SDK teamThe issue doesn't require a change to the product in order to be resolved. Most issues start as that