You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gateway heartbeat feature stops working after triggering 1-2 times. The timer does not reschedule after firing, causing heartbeat to permanently stop.
Timeline
2026-03-09 16:50: User asked about OpenClaw v2026.3.8 release notes
2026-03-09 17:02:12: Config hot reload (lossless-claw plugin update)
2026-03-09 17:02:14: Heartbeat first triggered (never worked correctly from the start)
2026-03-09 to 2026-03-13: Heartbeat intervals chaotic (minutes to hours, not periodic)
2026-03-14 10:14: Heartbeat triggered last time
2026-03-14 10:14 to 12:46: No heartbeat for 2.5 hours
2026-03-14 12:46: Gateway restarted
2026-03-14 12:46:00: Heartbeat triggered once after restart
2026-03-14 13:16: Expected heartbeat (MISSING)
2026-03-14 13:37: Still no heartbeat (51 minutes since last trigger)
Evidence
Log excerpts (2026-03-14):
2026-03-14T10:11:18.478+08:00 [heartbeat] started
2026-03-14T10:14:11.872+08:00 [heartbeat] started
# GAP: 2.5 hours with NO heartbeat
2026-03-14T12:46:00.236+08:00 [heartbeat] started (after Gateway restart)
# NO subsequent triggers (expected every 30m)
Bug Description
Gateway heartbeat feature stops working after triggering 1-2 times. The timer does not reschedule after firing, causing heartbeat to permanently stop.
Timeline
Evidence
Log excerpts (2026-03-14):
Configuration at time of failure:
{ "agents": { "defaults": { "heartbeat": { "every": "30m", "activeHours": { "start": "07:00", "end": "24:00", "timezone": "Asia/Shanghai" }, "target": "last", "directPolicy": "allow" } }, "list": [ { "id": "agent-qwen", "heartbeat": {} } ] } }Root Cause Analysis
1. Heartbeat never worked correctly
From first activation on 2026-03-09, intervals were chaotic (not periodic as configured with
every: "1h")2. Hot reload may corrupt timer
Config hot reloads on 2026-03-14 (10:05 and 10:13) were followed by heartbeat stopping completely
3. Timer not rescheduling
After each trigger, the timer should reschedule for next interval. Instead, it fires 1-2 times then stops permanently.
4. Gateway restart only temporarily fixes
Restart causes one trigger, then timer stops again.
🔍 CRITICAL: Related to Lossless-Claw Context Engine
Timeline correlation:
Gateway log (2026-03-09 17:02):
Related Issues:
Lossless-Claw / Context Engine:
Heartbeat:
Hypothesis:
The lossless-claw context engine registration timing bug (#40232) may be causing heartbeat scheduler to fail:
Expected Behavior
Heartbeat should trigger periodically (every 30m or 1h as configured) during activeHours (07:00-24:00).
Actual Behavior
Impact
Environment
Workaround
Use cron job instead of built-in heartbeat:
{ "schedule": { "kind": "cron", "expr": "0,30 7-23 * * *", "tz": "Asia/Shanghai" }, "payload": { "kind": "agentTurn", "message": "Execute heartbeat tasks" } }Request
everyduration parsing — ensure correct interval calculation