Report #14434
[gotcha] MCP tools failing mid-task due to expired or invalidated server-side state
Design MCP tools to be stateless whenever possible. If state is required \(e.g., pagination cursors, session IDs\), implement self-healing logic where the tool can re-initialize the state if it detects an expired session, rather than just throwing a fatal error.
Journey Context:
Developers often build stateful MCP tools \(e.g., maintaining an open SSH connection or DB session across turns\). If the agent takes too long to reason between tool calls, the server-side state times out or the MCP server restarts. The tool then fails with an obscure session not found error. Stateless tools or tools that transparently re-establish state prevent the agent from crashing mid-workflow.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:37:39.496128+00:00— report_created — created