openclaw - 💡(How to fix) Fix Heartbeat timer never fires (only 'started' logged, zero ticks) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#51427Fetched 2026-04-08 01:11:25
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×2closed ×1locked ×1

Code Example

{
  "agents": {
    "defaults": {
      "heartbeat": {
        "every": "30m",
        "target": "last"
      }
    }
  }
}

---

2026-03-21T06:33:54 heartbeat: started {intervalMs: 1800000}
2026-03-21T08:25:03 heartbeat: started {intervalMs: 1800000}  (after restart)
2026-03-21T10:49:50 heartbeat: started {intervalMs: 1800000}  (after config hot reload)
RAW_BUFFERClick to expand / collapse

Problem

Heartbeat timer initializes (heartbeat: started logged) but never actually fires/ticks. After 6+ hours of gateway uptime, zero heartbeat runs have occurred despite:

  • every: "30m" configured
  • target: "last" configured
  • No activeHours restriction (should be 24/7)
  • Multiple 30+ minute idle periods with no requests-in-flight
  • HEARTBEAT.md exists with real content (not empty)
  • Channel visibility defaults are fine (showOk: false, showAlerts: true, useIndicator: true)

Config

{
  "agents": {
    "defaults": {
      "heartbeat": {
        "every": "30m",
        "target": "last"
      }
    }
  }
}

No agents.list[] entries with heartbeat blocks.

Evidence

Gateway log shows only heartbeat: started entries (timer init), never any tick/fire/skip/run:

2026-03-21T06:33:54 heartbeat: started {intervalMs: 1800000}
2026-03-21T08:25:03 heartbeat: started {intervalMs: 1800000}  (after restart)
2026-03-21T10:49:50 heartbeat: started {intervalMs: 1800000}  (after config hot reload)

No heartbeat skipped, no heartbeat tick, no heartbeat-related entries at all between these.

openclaw system heartbeat last also fails with gateway connection close.

Environment

  • OpenClaw 2026.3.13 (5af75b3)
  • Node v22.22.1 (via nvm)
  • Linux 6.8.0-101-generic (x64)
  • Channel: feishu (websocket mode)
  • Gateway: systemd service, loopback only

Expected

Heartbeat should fire every 30 minutes when session is idle and deliver to last contact.

extent analysis

Fix Plan

To resolve the issue of the heartbeat timer not firing, we need to modify the configuration and ensure that the heartbeat is properly triggered.

  • Update the target configuration to a valid contact or channel.
  • Verify that the HEARTBEAT.md file is correctly formatted and contains the expected content.
  • Check the gateway logs for any errors that may be preventing the heartbeat from firing.

Code Changes

No code changes are required for this fix. However, you can add logging to verify that the heartbeat is being triggered correctly.

// Example logging code
console.log('Heartbeat tick');

Configuration Changes

Update the agents configuration to include a valid target and ensure that the every interval is correctly set.

{
  "agents": {
    "defaults": {
      "heartbeat": {
        "every": "30m",
        "target": "valid-contact-or-channel"
      }
    }
  }
}

Verification

To verify that the fix worked, check the gateway logs for heartbeat tick entries. You can also use the openclaw system heartbeat last command to test the heartbeat functionality.

Extra Tips

  • Ensure that the HEARTBEAT.md file is not empty and contains the expected content.
  • Verify that the gateway is properly configured and connected to the channel.
  • Check the system logs for any errors that may be preventing the heartbeat from firing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Heartbeat timer never fires (only 'started' logged, zero ticks) [2 comments, 2 participants]