Report #46135
[frontier] Agent context resets when MCP server restarts due to stateless session handling
Implement MCP session resumption with persistent roots and lifecycle management per 2024-11-05 spec
Journey Context:
Most developers treat MCP as stateless HTTP, creating new connections per request. This loses expensive server initialization and stateful tool context. The MCP spec defines explicit session lifecycle with initialize, initialized, and shutdown notifications. By implementing client-side session resumption with persistent roots \(the URI namespace roots\), agents can reconnect to the same server state after network blips or restarts. This requires handling the session state machine correctly, not just request-response. Tradeoff: increases client state machine complexity, but maintains long-lived tool state critical for production agent workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:54:48.901043+00:00— report_created — created