#Forgive the double post - also in "help

1 messages · Page 1 of 1 (latest)

wispy vortex
#

what do you actually want to use the heartbeat for if anything?

maybe turn it off (set interval to 0s) to give yourself a breather and revisit... tbh i still don't understand how it works myself so can't provide any tips beyond this, dropping a pin for myself to learn here too : )

sharp marlin
#

If you guys figure it out I'd like to know too.

If heartbeat has to use tokens even if there's nothing to do, I want it to run infrequently (or turn it off).

I am wondering if there is anyway to make heartbeat not send anything to the LLM if there are no tasks?

raw warren
#

Hey guys, I did some analysis on the code base, and also through all my logs and attempted to better understand what was causing my token burn issues. Here's a brief summary of where I landed. Hopefully it may be of use to others.

Token Burn Investigation: Lessons Learned
The Problem
My Anthropic tokens were being consumed far faster than expected—my agent was running ~6 hours of agent time per day when I expected minimal usage.

Root Cause
Cron jobs with wakeMode: "now" bypass your heartbeat interval entirely.

I had set heartbeat.every: "2h" in my config, but my agent had created cron jobs that triggered full agent runs every few minutes—completely independent of my heartbeat setting.

Key Insight: Two Separate Systems
Config heartbeat (heartbeat.every) — The built-in timer you configure
Cron jobs — Jobs your agent can create via the cron tool
If your agent created cron jobs with wakeMode: "now", those run on top of your config heartbeat. Each one triggers a full agent turn.

How to Check

clawdbot status # Shows your config heartbeat interval
clawdbot cron list # Shows ALL cron jobs (including agent-created ones)
Look for cron jobs with frequent intervals—these may be burning tokens.

How to Fix

clawdbot cron edit <job-id> --disable
Cost Optimization
Use a cheaper model for heartbeats:

{
"agents": {
"defaults": {
"heartbeat": {
"every": "2h",
"model": "anthropic/claude-haiku-4-5"
}
}
}
}
Haiku handles routine checks fine—save Opus/Sonnet for actual conversations.

#

Just read some advice in other threads. Ignore my suggestion on Haiku. Apparently, it is prone to prompt injection. leave as Opus, or switch to Minimax

sharp marlin
#

That’s smart didn’t know you could do that. Is that all set in ~/.clawdbot/clawdbot.json?

sharp marlin
sharp marlin
# raw warren Hey guys, I did some analysis on the code base, and also through all my logs and...

I've suddenly got the same or similar problem out of nowhere. My agent is complaining that it's flooded with "Pre-compaction memory flush" and "HEARTBEAT_OK" prompts. My heartbeat was set at 60m. My token use went from 9k/200k to 185k/200k in just a couple of minutes with very little chat.

Clawdbot status shows 60m for heartbeat.

I only have 1 cron that runs once every 24 hours.

Does this sound like the same problem? I'm having trouble figuring out how this causes crazy token burn like this. In your case you had cron jobs running frequently right?