skip to content

In OpenClaw, what is a heartbeat, how often does it run by default, and how does it stay silent when nothing needs attention?

level: juniorimportance: must knowfreq 18%

answer

  1. a periodic turn, not a chat reply
  2. 30m, or 1h on Anthropic OAuth
  3. system-owned job in the Automations scheduler
  4. the default prompt's silent token
  5. legacy token only at the edges

basics

~20 s

An OpenClaw heartbeat is a system-owned automation that runs a periodic agent turn in the main session, every 30m by default (1h with Anthropic OAuth/token auth). When nothing needs attention the agent replies NO_REPLY and nothing is sent.

solid answer

~50 s

A heartbeat is a scheduled agent turn in the agent's main session so the model can surface anything that needs attention without being messaged. The Gateway keeps one system-owned automation job per heartbeat-enabled agent, listed as `Heartbeat (agent-id)` in `openclaw cron list --all`, but you configure it under `agents.defaults.heartbeat` or `agents.entries.<id>.heartbeat`, not by editing the job. `every` defaults to `30m`, or `1h` when Anthropic OAuth/token auth is configured and `every` is unset; `0m` disables only the recurring cadence. In 2026.9.9 the default prompt tells the model to follow the monitor scratch, not to revive old tasks from prior chats, and to reply `NO_REPLY` when nothing matters. The `heartbeat_respond` tool with `notify: false` is the structured way to stay quiet, and a legacy `HEARTBEAT_OK` at the start or end of a reply is still accepted when what remains is at most 300 characters.

go deeper

for a junior

Recall that a heartbeat is a periodic agent turn the Gateway starts itself, every 30m by default, and that a quiet turn ends in NO_REPLY so nothing is sent.

for a middle

Explain the plumbing: config under agents.defaults.heartbeat drives a system-owned Automations job, 0m stops only the cadence, and the legacy HEARTBEAT_OK is honoured only at the edges with at most 300 characters left.

for a senior

Show you know what still wakes the agent with the cadence off, event wakes and their rate limits, and why disabling the scheduler silently stops heartbeats.

for a principal

Frame the heartbeat as an ambient monitor that should default to silence, and argue when its narrow prompt is enough versus when work deserves its own scheduled job.

## What a heartbeat is A **heartbeat** is OpenClaw's ambient monitor: a **periodic agent turn** that the Gateway starts on its own, with no inbound message, so the assistant can notice something worth telling you and stay quiet otherwise. It runs in the agent's **main session** by default, so it sees the same conversation context as your direct chats. Under the hood the cadence belongs to the **Automations scheduler**. The Gateway maintains one system-owned automation job per heartbeat-enabled agent, which shows up in `openclaw cron list --all` as `Heartbeat (agent-id)`. The config is the desired state and the job is how it is carried out: - you edit `agents.defaults.heartbeat` (global) or `agents.entries.<id>.heartbeat` (per agent), never the job itself; - the Gateway writes config changes through to the job at startup and on config reload; - `openclaw doctor --fix` can create or repair missing or stale monitor rows. Because heartbeats ride on the scheduler, setting `cron.enabled: false` or launching the Gateway with `OPENCLAW_SKIP_CRON=1` stops scheduled heartbeats too; the Gateway logs a startup warning and there is no separate fallback timer. ## Cadence and its default | Situation | Effective `every` | | --- | --- | | Nothing configured | `30m` | | Anthropic provider defaults with OAuth/token auth, `every` unset | `1h` | | `every` set explicitly | your value (duration string, default unit minutes) | | `every: "0m"` | recurring cadence off | Key points about `0m`: 1. It disables only the **recurring** cadence. The automation job stays, disabled, and its monitor scratch is kept for when you turn the cadence back on. 2. A **targeted event wake** can still run one turn, for example when a background command finishes. Those turns are rate-limited per agent: at least 30 seconds apart, with a flood guard after five starts within 60 seconds. 3. If any agent entry has its own `heartbeat` block, **only those agents** run heartbeats; the per-agent block merges on top of the defaults. ## How it stays silent Silence is the normal outcome, and OpenClaw has three ways for a turn to end quietly: - **`NO_REPLY`** is what the default prompt asks for: *Follow the heartbeat monitor scratch context when provided... Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply NO_REPLY.* The prompt is sent verbatim as the scheduled user message; there is no heartbeat-specific system-prompt section. - **`heartbeat_respond`** is a structured tool the agent can call instead: `notify: false` for no visible update, or `notify: true` plus `notificationText` for an alert. When present it takes precedence over the text reply. - **Legacy `HEARTBEAT_OK`**: older custom prompts may still return it. OpenClaw strips it at the **start or end** of a reply and drops the reply when the remaining content is at most **300 characters**. The budget is fixed, not a config field. In the **middle** of a reply the token is not special, and a reply with more than 300 characters left is delivered with the token stripped. By default each channel's `heartbeatVisibility` hides OK acknowledgements (`showOk: false`) and shows alerts (`showAlerts: true`). Control UI and WebChat history hide heartbeat prompts and OK-only acknowledgements, though the session transcript keeps them for audit. ## Where an alert goes When the turn does produce an alert, the default `target` is `owner`: the operator's direct message, resolved from `commands.ownerAllowFrom` or a channel `allowFrom`, and never a group. Choosing other targets is a delivery question of its own. ## What the default deliberately does not do The default heartbeat is narrow on purpose. It does not mine old chats for chores, and the monitor scratch is prompt context, not a scheduler. Work that needs its own instructions and its own schedule, such as a morning report, belongs in a separate automation job with its own run history; the heartbeat is for ambient awareness and for reacting to events like a finished background command. A short way to remember it: a heartbeat is a scheduled question to the agent, *anything that needs me?*, whose normal answer is no and costs a message to nobody.

  • In OpenClaw, what happens to a heartbeat when you set `every: "0m"`?
    Only the recurring cadence stops. The system-owned automation job stays, disabled, and its monitor scratch is kept for later. A targeted event wake, such as a background command finishing, can still run one agent turn, rate-limited to one every 30 seconds with a flood guard after five starts in 60 seconds. To stop those completion turns too, set `tools.exec.notifyOnExit: false`.
  • Besides `0m`, what stops scheduled OpenClaw heartbeats from running?
    Heartbeats ride on the Automations scheduler, so `cron.enabled: false` or `OPENCLAW_SKIP_CRON=1` in the Gateway's environment stops scheduled heartbeats even when `every` is set; the Gateway logs a warning at startup. `openclaw system heartbeat disable` turns heartbeats off from the CLI. Manual and event-driven wakes remain available in the scheduler-off case.

A heartbeat is a night nurse doing rounds: she checks every half hour by default, and only wakes you when something is actually wrong; a quiet round leaves no note on your pillow.

  • A heartbeat messages the owner with a status update on every tick.
  • Setting every to 0m deletes the heartbeat job and every event wake.
  • HEARTBEAT_OK anywhere in a reply suppresses the whole message.
  • You change heartbeat cadence by editing its automation job directly.
  • Heartbeats keep running on their own timer when automations are disabled.

Assumes OpenClaw 2026.9.9: the default prompt asks for NO_REPLY, HEARTBEAT_OK is a legacy acknowledgement, and the cadence is a system-owned Automations job.