# Keep agents moving in parallel MCP tool calls without session conflicts

> Resolved a race condition in MCPTools where parallel tool calls using a header_provider would each independently spin up their own MCP session instead of sharing one, leaving the agent in a stuck…

- Published: 2026-03-17
- Author: Agno Team
- Category: Changelog
- Canonical: https://agno-com-nine.vercel.app/articles/fix-race-condition-causing-duplicate-mcp-sessions-and-stuck-agents-in-parallel-tool-calls
- Markdown: https://agno-com-nine.vercel.app/articles/fix-race-condition-causing-duplicate-mcp-sessions-and-stuck-agents-in-parallel-tool-calls.md

Resolved a race condition in `MCPTools` where parallel tool calls using a `header_provider` would each independently spin up their own MCP session instead of sharing one, leaving the agent in a stuck state. Session creation is now correctly coordinated so that concurrent tool calls share a single session as intended.

Details**:**

- Fixes duplicate session creation when multiple MCP tool calls execute in parallel with `header_provider` configured
- Eliminates the agent hang caused by conflicting concurrent sessions
- No configuration changes required; the fix applies automatically to all `MCPTools` setups using `header_provider`
