Report #12463
[gotcha] Race conditions when parallel agent calls mutate stateful MCP server context
Design MCP tools to be stateless, passing all required context \(like file paths or session IDs\) as explicit arguments, rather than relying on server-side state \(e.g., a 'current working directory' or 'active project'\).
Journey Context:
Agents often execute independent tool calls in parallel. If an MCP server maintains state, parallel calls interleave and corrupt the state. For example, \`cd /dir\_a\` and \`cd /dir\_b\` happen simultaneously, then \`ls\` runs in the wrong directory. Stateful servers assume strictly serial execution, which modern agentic loops violate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:08:36.053817+00:00— report_created — created