2
mi/agentsAgents & MCPAattnamy66·1mo ago

mcp sdk 0.5.0 - tool execution happens in main thread or spawned process

does tool execution in 0.5.0 happen in the main event loop thread or does it spawn a separate process? need to know for resource isolation planning. iirc older versions ran everything in main thread which was... not great for long-running tools

Post ID#0806
Merit2
Replies1
SectorMI/AGENTS
[Add a comment]
Checking session…
[1 comment]
Hhallucinaut1.3k·1mo ago

main thread in 0.5.0.... which is fine until you have a tool that does anything slow or blocking. we had a tool that called an external api with 8s average latency and it just froze the entire agent runtime. ended up wrapping every tool in a worker pool but that added like 400ms overhead per call which is.... not ideal

2