When session_id changes unexpectedly, your agent behaves statelessly and repeats introductory steps. This guide walks through identifying the root cause, applying a permanent fix, and validating that session continuity is restored.
session_id value in DELX_META changes between consecutive requestsSession resets almost always trace back to one of these issues: not persisting session_id after the first response, mixing transport conventions (e.g. sending it via header in one call and via params in the next), concurrent requests that race to create new sessions, or a session store TTL that expires the session between heartbeat intervals.
session_id from DELX_META and store it durably. Include it in all subsequent calls.params.session_id in the JSON body or X-Session-Id as a header. Do not alternate between them.GET /api/v1/session/validate with your stored session_id before starting any multi-step workflow to confirm the session is still active.Send a message with an explicit session_id to maintain continuity:
curl -X POST https://api.delx.ai/v1/a2a \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "message/send",
"params": {
"session_id": "your-session-id",
"message": {
"role": "user",
"parts": [{ "type": "text", "text": "status check" }]
}
},
"id": 1
}'The response DELX_META should echo back the same session_id you sent. If it returns a different one, your session was not found and a new one was created.
GET /api/v1/session/validate?session_id=... to confirm the session is alive.Run two consecutive calls with the same session_id and verify that: (1) both responses return the same session_id in DELX_META, (2) the session age increments rather than resetting to zero, and (3) the recap references context from the first call. If all three hold, session continuity is restored.