Skip to main content
Two things break when your server does not keep session state between requests: session identity (calls stop lining up into one session) and delivery (the platform freezes your process before background events are sent). This page applies to you if either of these is true:
  • You deploy to serverless (Vercel, Lambda, Cloud Run scaled to zero), so initialize and each tool call land on different instances.
  • You set stateless_http=True, or the equivalent in your SDK, even when you run a single long-lived container or process.

How to tell you need this

Open your Sessions page. Without the two steps below, you will see:
  • Sessions don’t line up. Calls arrive with no session identity, so Armature falls back to heuristic grouping: separate conversations from the same caller can merge into one session, and others land as fallback sessions instead of one session per conversation.
  • Client shown as Unknown. The client name and version never reach us.
Both symptoms come from the same cause, and step 2 below fixes both at once. Both fixes are one-liners. They cover clients on the classic handshake protocol, which is still most agent traffic today. Requests on the 2026-07-28 protocol revision carry no initialize handshake and are attributed automatically.

1. Use await delivery

Background delivery relies on the process staying alive after the response. In serverless, send events before returning instead:

2. Resolve the session per request

The SDK mints identity-bearing session IDs (mcp_<client>_v_<version>_<uuid>) on initialize and reads them back on later requests, so client attribution survives across instances.
Call resolveStatelessHttpSession per request and pass the results to the transport and dispatch context:
Session IDs are attribution metadata, not a security boundary. Clients echo them back unsigned. Keep authorization on your own auth layer.