openclaw - 💡(How to fix) Fix [Bug]: hasExplicitHeartbeatAgents ignores global heartbeat defaults when any agent has explicit config [3 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#78708Fetched 2026-05-07 03:33:32
View on GitHub
Comments
3
Participants
2
Timeline
7
Reactions
2
Author
Timeline (top)
commented ×3closed ×2cross-referenced ×1reopened ×1

Error Message

  • Cron jobs targeting session: main silently skipped with "error": "disabled"

Root Cause

In heartbeat-summary.ts, isHeartbeatEnabledForAgent:

function isHeartbeatEnabledForAgent(cfg, agentId) {
  if (hasExplicitHeartbeatAgents(cfg)) {
    return list.some(entry => Boolean(entry?.heartbeat) && entry.id === agentId);
  }
  if (cfg.agents?.defaults?.heartbeat) return true;
}

hasExplicitHeartbeatAgents checks if any agent has a heartbeat config. If so, only agents with explicit heartbeat are enabled — the global default is never consulted.

Code Example

function isHeartbeatEnabledForAgent(cfg, agentId) {
  if (hasExplicitHeartbeatAgents(cfg)) {
    return list.some(entry => Boolean(entry?.heartbeat) && entry.id === agentId);
  }
  if (cfg.agents?.defaults?.heartbeat) return true;
}

---

{
  "agents": {
    "defaults": {
      "heartbeat": { "every": "600m" }
    },
    "list": [
      { "id": "main" },
      { "id": "sexmaid", "heartbeat": { "every": "0m" } }
    ]
  }
}
RAW_BUFFERClick to expand / collapse

Bug Description

When any agent in agents.list has an explicit heartbeat config, the global agents.defaults.heartbeat setting is completely ignored for all other agents that don't have their own heartbeat config.

A single agent with heartbeat: { "every": "0m" } inadvertently disables heartbeat for ALL other agents relying on the global default.

Root Cause

In heartbeat-summary.ts, isHeartbeatEnabledForAgent:

function isHeartbeatEnabledForAgent(cfg, agentId) {
  if (hasExplicitHeartbeatAgents(cfg)) {
    return list.some(entry => Boolean(entry?.heartbeat) && entry.id === agentId);
  }
  if (cfg.agents?.defaults?.heartbeat) return true;
}

hasExplicitHeartbeatAgents checks if any agent has a heartbeat config. If so, only agents with explicit heartbeat are enabled — the global default is never consulted.

Reproduction

{
  "agents": {
    "defaults": {
      "heartbeat": { "every": "600m" }
    },
    "list": [
      { "id": "main" },
      { "id": "sexmaid", "heartbeat": { "every": "0m" } }
    ]
  }
}

Expected: main uses global default 600m heartbeat. Actual: main heartbeat is disabledhasExplicitHeartbeatAgents returns true (due to sexmaid), and main has no explicit heartbeat config.

Impact

  • Cron jobs targeting session: main silently skipped with "error": "disabled"
  • System event enqueued but never processed (runHeartbeatOnce returns skipped)
  • No user visibility into why main session cron jobs fail

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 [Bug]: hasExplicitHeartbeatAgents ignores global heartbeat defaults when any agent has explicit config [3 comments, 2 participants]