openclaw - 💡(How to fix) Fix [Bug]: default HEARTBEAT.md calls a model API event if its "default empty" [3 pull requests]

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…

This commit https://github.com/openclaw/openclaw/commit/2fb9c7e3e586044467f360edf8d8f5170f1c60f5 added a new line to HEARTBEAT.md, specifically this https://github.com/openclaw/openclaw/commit/2fb9c7e3e586044467f360edf8d8f5170f1c60f5#diff-b4eec1193291a4ac4f1b9fcf14591f100639606ce1d088ed9f215517c411c5bbR13-R16

Which results isHeartbeatContentEffectivelyEmpty() to return true, because it removes only certain stuff like markdown headers.

This caused always calling a model API with token usage.

Root Cause

Which results isHeartbeatContentEffectivelyEmpty() to return true, because it removes only certain stuff like markdown headers.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

This commit https://github.com/openclaw/openclaw/commit/2fb9c7e3e586044467f360edf8d8f5170f1c60f5 added a new line to HEARTBEAT.md, specifically this https://github.com/openclaw/openclaw/commit/2fb9c7e3e586044467f360edf8d8f5170f1c60f5#diff-b4eec1193291a4ac4f1b9fcf14591f100639606ce1d088ed9f215517c411c5bbR13-R16

Which results isHeartbeatContentEffectivelyEmpty() to return true, because it removes only certain stuff like markdown headers.

This caused always calling a model API with token usage.

Steps to reproduce

  1. Start openclaw with brand new agent, onboard it.
  2. Wait
  3. Specifically in Claude logs you should see token usage, even when HEARBEAT.md is "empty" (by default).

Expected behavior

isHeartbeatContentEffectivelyEmpty() should return true after the docs line was added, so there is no additional token cost at every heartbeat with the default HEARTBEAT.md

Actual behavior

Real token usage even with default "empty" HEARTBEAT.md

OpenClaw version

2026.5.18

Operating system

Ubuntu

Install method

docker

Model

anthropic/claude-sonnet-4-6

Provider / routing chain

openclaw -> anthropic

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

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…

FAQ

Expected behavior

isHeartbeatContentEffectivelyEmpty() should return true after the docs line was added, so there is no additional token cost at every heartbeat with the default HEARTBEAT.md

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]: default HEARTBEAT.md calls a model API event if its "default empty" [3 pull requests]