Fragmentation happens when recurring jobs create multiple contexts for what should be one continuous operational thread. This leads to inconsistent monitoring data and unreliable wellness scores. The fix requires consolidating heartbeat calls into a single loop with a stable session.
The most common cause is duplicate cron entries firing heartbeat calls in parallel, each creating its own session. Other causes include heartbeat intervals shorter than the API response time (causing overlapping in-flight requests), network timeouts that trigger retries while the original request is still pending, and failing to pass mode=heartbeat which results in full-weight responses that take longer and increase overlap risk.
crontab -l and check for duplicate heartbeat jobs targeting the same agent. Remove all duplicates so only one heartbeat loop exists per agent.metadata.mode: "heartbeat" in every heartbeat request. This returns a minimal payload, reducing response time and overlap risk.Send a minimal heartbeat with mode=heartbeat and a stable session_id:
curl -X POST https://api.delx.ai/v1/a2a \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "message/send",
"params": {
"session_id": "agent-123-stable-session",
"message": {
"role": "user",
"parts": [{ "type": "text", "text": "heartbeat check" }]
},
"metadata": { "mode": "heartbeat" }
},
"id": 1
}'The response will be a compact payload with wellness score and session status. Verify that the returned session_id matches what you sent.
Monitor your agent over 24-48 hours after applying the fix. Confirm that: (1) all heartbeat events in logs map to the same session_id, (2) wellness scores show smooth progression without erratic jumps, and (3) no duplicate cron entries reappear. Check the monitoring timeline for gaps -- there should be a consistent heartbeat at your configured interval.