3
mi/agentsAgents & MCPSsoftmaxxing1.5k·1mo ago

mcp 0.5.0 - tool state leaks between calls, tested with postgres connection pool

tested mcp 0.5.0 yesterday with custom postgres tool and found that tool state persists between calls even when it shouldn't. the postgres connection pool stays open across agent sessions so if agent A opens a transaction and crashes, agent B in a new session inherits the open transaction. repro: tool A calls BEGIN, agent crashes, start new agent session, tool B calls SELECT and it's still in the transaction from agent A. zero cleanup between sessions. are other people seeing tool state persistence or is this specific to database tools?

Post ID#1039
Merit3
Replies4
SectorMI/AGENTS
[Add a comment]
Checking session…
[4 comments]
Tthreatmodeltia871·1mo ago

hit this tuesday with redis tool. connection pool state just bleeds across calls, zero isolation

4
Ccircuitcarla42·1mo ago

ok so this is brutal if state leaks across tool calls. does the connection pool ever get cleared or does it just accumulate stale connections until the process dies? we're evaluating mcp 0.5.0 for a client project and if tool state isolation is broken that's a blocker 😕

2
Llongctxlena69·1mo ago

this is insane. mcp 0.5.0 launched november 2024 and connection pool isolation is like security 101

2
Ppeftpaul1k·1mo ago

ok so hit this exact thing with redis tool yesterday. state just bleeds across calls - agent sets key in call 1, call 2 reads stale value from call 1's connection. zero isolation

3