OpenClaw playbook

Heartbeat-first OpenClaw automation (without token spikes)

A heartbeat can make OpenClaw feel autonomous, but it can also create silent runaway loops. This playbook shows how to design a heartbeat that is useful, cheap, and safe to run unattended.

TL;DR (the safe automation progression)

Start with a heartbeat that only reports status. Then add one small action. Then add approvals for risky actions. Autonomy is earned.

The number one heartbeat mistake is skipping budgets and stop conditions.

  • Tier 1: report only (no external side effects)
  • Tier 2: safe actions (format, summarize, draft)
  • Tier 3: risky actions behind explicit approval
  • Always: budgets (time, steps, external calls) and a stop rule

Heartbeat vs cron jobs: use the right trigger

OpenClaw supports both heartbeats (a periodic tick) and cron jobs (scheduled runs). A heartbeat is best for “check and report” loops. Cron jobs are best when you know the schedule and want explicit execution windows.

If you want to run a workflow once a day at a specific time, use cron. If you want a lightweight health check every N minutes, use heartbeat.

  • Heartbeat: periodic, simple, good for monitoring and nudges
  • Cron: explicit schedule, better for daily/weekly runs
  • Either way: keep the first version read-only and observable

Budgets and stop conditions (the core guardrails)

A good heartbeat is a bounded program. It should have hard limits and clear “done” states.

Budgets prevent silent spending and reduce the chance of retry storms when tools are flaky.

Design principle

A heartbeat should never be the first time you try a new tool. Prototype manually, then automate the stable version.

  • Time budget: maximum wall time per run
  • Step budget: maximum tool calls per run
  • Scope budget: what it is allowed to touch (files, channels, endpoints)
  • Stop conditions: explicit reasons to stop early and ask for help

A default heartbeat template (report first)

Use this template to avoid the classic failure: the heartbeat does “a little bit of everything” and becomes impossible to predict.

The key is to separate: observation, planning, and acting.

  • Observe: read the minimum inputs (recent messages, key memory files)
  • Plan: produce a short action list with confidence levels
  • Report: send the plan as a digest
  • Act: only take pre-approved, low-risk actions automatically

Heartbeat run format (output contract)

## Status
- What changed since last run:
- What looks risky or blocked:

## Proposed actions (no side effects yet)
1) ...

## Needs approval
- ...

Retries: prevent “helpful” from turning into a storm

When tools fail, retries are necessary. But retries without limits create storms that look like “OpenClaw went crazy.”

Treat retries like you treat budgets: explicit, limited, and visible.

  • Retry a small number of times with backoff
  • Do not retry actions that can double-charge or double-send messages
  • If a tool is flaky, degrade gracefully: skip and report
  • Log and surface failures in the heartbeat report

Sub-agents: when parallelism is worth it

Parallel sub-agents can speed up research and triage, but they also multiply cost and failure surface area. Use them when the work splits cleanly into independent chunks with bounded outputs.

If you cannot define the chunk output in a paragraph, do not parallelize it.

  • Good: “summarize 5 links into a 10-bullet brief”
  • Good: “triage 20 tickets into 3 categories”
  • Bad: “go figure everything out”
  • Always: cap sub-agent count and total token budget

How Clawdguy helps (automation is easier when infra is boring)

Automation amplifies infrastructure problems. If your gateway is slow or frequently interrupted, heartbeats and cron jobs will look unreliable even if your workflow design is solid.

Clawdguy gives you a stable OpenClaw runtime so your automation failures are actually workflow failures, not infrastructure noise.

  • Dedicated infrastructure with predictable performance
  • Lifecycle controls for updates and recovery
  • A clean baseline for heartbeat and cron automation