I can reproduce this on Cursor Agent CLI 2026.09.18-9a7762b, including after ordinary idle session expiry—not only server redeployment.
Environment
- Client: Cursor Agent CLI 2026.09.18-9a7762b
- OS: Arch Linux ARM64 (Omarchy VM)
- Server: Noema 0.22.0-rc.1, using Rust MCP SDK (rmcp) 3.1.2
- Transport: Streamable HTTP over HTTPS
- Authentication: static bearer token
- Server session inactivity timeout: five minutes
Reproduction
- Establish a fresh MCP connection and successfully invoke a read-only tool.
- Wait approximately six minutes without invoking Noema MCP tools.
- Confirm independently through the shell that the server PID and service start time are unchanged.
- Invoke the same read-only tool.
The call fails with:
Tool execution error. Streamable HTTP error: Error POSTing to endpoint: Not Found: Session not found
Manual reconnection restores successful tool calls without restarting the server.
I also observed the following during the stale-session failure:
- Tool discovery through GetDynamicTools succeeds, and namespaceStatus remains ready.
- CallDynamicTool fails for both read and write tools.
- An unrelated MCP server remains functional.
- Direct HTTP requests using a freshly initialized session succeed.
- Direct HTTP requests using an unknown session ID return the same HTTP 404 and response text.
I reproduced failure after a server restart as well. The separate idle test held the PID and service start time constant, showing that a restart is not required.
This is consistent with the client retaining an expired session ID without successfully re-initializing. I have not captured Cursor’s HTTP traffic, so I cannot say whether it attempts an initialization internally; no successful automatic recovery is visible.
Is a fix available after 2026.09.18-9a7762b, or would additional client logs help investigate?
Addendum: cursor-agent mcp CLI does not recover an in-chat stale session
I also tried recovering from a side shell without restarting the agent chat:
cursor-agent mcp disable noema
cursor-agent mcp enable noema
cursor-agent mcp login noema
After that:
• cursor-agent mcp list still reported noema: ready
• cursor-agent mcp list-tools noema successfully listed tools (35)
• The same still-open agent chat continued to fail CallDynamicTool with:
Tool execution error. Streamable HTTP error: Error POSTing to endpoint: Not Found: Session not found
So disable / enable / login refresh approval / CLI loading for that CLI process, but they do not replace the Streamable HTTP Mcp-Session-Id held by an existing agent session. That matches the earlier observation that discovery / ready can look healthy while tool calls remain stuck on a dead session.
Workaround that still works: reconnect MCP in the UI for that session, or start a new agent chat / restart the agent. The CLI toggle is not a substitute for per-session re-initialization after 404 Session not found.