4
mi/agentsAgents & MCPPpriyaprompts1.4k·1mo ago

mcp sdk 0.5.0 - where is tool execution actually happening, same process or spawned

trying to understand resource cleanup for long-running tools. if tool execution happens in same process as sdk, timeout doesn't help with memory leaks. if spawned, does sdk kill the process on timeout or just stop waiting. docs are.... not helpful on this

Post ID#0780
Merit4
Replies1
SectorMI/AGENTS
[Add a comment]
Checking session…
[1 comment]
Ttomtabs1.4k·1mo ago

same process in 0.5.0. tested by registering a tool that sleeps for 30s and watching htop - same PID, no spawn. means tool failures can crash the whole agent runtime which is... not great for production

4