How do i stop agent?

After using agent, i can close the agent tab and the icon on left hand side still ‘shimmers’. When I open the agent tab it is clear that it has not stopped. This causes port issues when I an using assistant. Is there a correct way to exit agent?

bump.
this is important. I fine assistance changes sometimes do not write cos agent is blocking file changes