skip to content

Rolling OpenClaw out for a small team, how do you decide how proactive its heartbeat should be: cadence, hours, reach, and what it may do unprompted?

level: principalimportance: nice to knowfreq 3%

answer

  1. quiet by default is a feature
  2. awareness against spend and noise
  3. owner DM before any group
  4. monitor versus scheduled job
  5. guidance is not enforcement

basics

~20 s

Start narrow and widen with evidence: owner-DM delivery, team-timezone active hours, an isolated light monitor unless chat context earns its cost, and separate jobs for recurring work. Tool policy, not the prompt, limits unprompted actions.

solid answer

~40 s

I treat proactivity as a budget on three things: tokens, attention and risk. The default heartbeat is already conservative: it does not revive tasks from old chats, replies `NO_REPLY` when nothing matters and sends alerts to the owner's DM. I keep that, set `activeHours` and `agents.defaults.userTimezone`, and pick the context per agent: `isolatedSession` and `lightContext` for cheap monitors, the main session only where recent-chat awareness pays for itself. Anything with its own schedule or output becomes its own automation job with run history. Group delivery through `target: "last"` or a channel target is a reviewed exception. And what the agent may do unprompted is decided by tool policy, exec approvals and the sandbox; scratch and `AGENTS.md` only steer it. Then I widen with evidence from skip reasons and usage, not by default.

go deeper

for a junior

Recall that a heartbeat acts without being asked, so its cadence, hours and delivery target decide how often it can interrupt someone.

for a middle

Explain which settings control cadence, hours, context and reach, and why recurring work belongs in its own automation job.

for a senior

Show how to measure a heartbeat's real cost and noise from skip reasons and usage, and how to bound each unattended turn.

for a principal

Own the trade-off between awareness, spend, noise and risk; put limits on unattended actions in tool policy and sandboxing, never in prompts.

## The decision a lead owns A heartbeat is the part of OpenClaw that acts without being asked. Every degree of proactivity buys some **awareness** (the assistant notices things before you do) and costs some combination of **tokens**, **attention** (interruptions, noise in shared chats) and **risk** (actions taken with no human in the loop). There is no single right setting; there is a setting that fits what the team will tolerate on each of those axes. The job is to choose it deliberately and revisit it with evidence. Because one Gateway is one trust boundary, a single operator or a mutually trusting team, the decision is made for that team as a whole. A heartbeat is not something to tune per stranger, and nothing about heartbeats makes one Gateway safe to share between people who do not trust each other. ## The dimensions and their trade-offs | Dimension | Conservative choice | More proactive choice | Main cost of going further | | --- | --- | --- | --- | | Cadence (`every`) | `1h`, or `0m` with explicit jobs only | `30m` default or shorter | linear token spend, more chances to interrupt | | Hours (`activeHours`) | working hours in the team's timezone | no window | night-time pings | | Context | `isolatedSession` + `lightContext` | main session with full bootstrap | about 100K tokens a turn instead of a few thousand, per the docs | | Reach (`target`) | `owner` direct message | `last` or a fixed group channel | noise and leakage into shared rooms | | Instructions | tiny monitor scratch, default prompt | broad custom `prompt` | the agent inventing work to do | | Actions | read-only tools, approvals on exec | broad tool access | unattended side effects | ## A defensible starting baseline 1. **Keep the default prompt's restraint.** It tells the agent not to infer or repeat old tasks from prior chats and to reply `NO_REPLY` when nothing needs attention. A broad custom prompt is the fastest way to turn a monitor into a nag. 2. **Pin time.** Set `agents.defaults.userTimezone` and an `activeHours` window; remember that targeted event wakes such as background command completions are not held by the window. 3. **Route to people, not rooms.** Keep `target: "owner"` with a concrete `commands.ownerAllowFrom` entry. Treat `target: "last"`, which includes groups, or a fixed group channel as an exception someone signs off. 4. **Choose context per agent.** An ops monitor watching for a failing service needs no chat history: isolate it and use `lightContext`. A personal assistant whose value is noticing loose ends in recent conversation may justify the main session at a longer cadence. 5. **Separate monitors from jobs.** Anything with its own schedule, instructions or deliverable, such as a morning digest or an inbox sweep, belongs in its own automation job with run history, not in heartbeat scratch. 6. **Bound each turn.** Set `heartbeat.timeoutSeconds` instead of relying on the fallback of the cadence capped at 600 seconds. ## Guidance versus enforcement The most important design line: **scratch, the heartbeat prompt, `AGENTS.md` and `SOUL.md` shape what the model tends to do; they do not stop it.** What an unattended turn *can* do is decided by tool policy, exec approvals, the sandbox and, for delivery, `target`, `directPolicy` and channel visibility. If an unprompted action would be unacceptable, remove the capability at those layers instead of writing a request not to. Note that the agent can rewrite its own scratch through `heartbeat_respond`, so scratch is not even a stable instruction, let alone a control. ## Evidence for widening or narrowing - `openclaw system heartbeat last` and the recorded skip reasons (`quiet-hours`, `no-route`, `empty-heartbeat-file`, `dm-blocked`) show whether the monitor is doing anything at all. - Per-session `/usage` output shows what a turn really costs before and after a change. - Alerts that people ignore or mute are a signal to narrow scratch or cadence; problems discovered late are a signal to widen context or add a dedicated job. ## When the answer is none Turning the cadence off with `every: "0m"` and running only explicit automation jobs is a legitimate choice for a team that wants predictable, reviewable runs. Event wakes still deliver background completions unless `tools.exec.notifyOnExit` is off. The cost is losing the ambient *anything I should know?* check, which is the heartbeat's whole reason to exist.

  • A teammate proposes adding 'never email customers' to the OpenClaw heartbeat scratch as a safety rule; what do you say?
    Scratch is prompt context that the agent can even rewrite through `heartbeat_respond`; it steers the model but enforces nothing. If emailing customers from an unattended turn is unacceptable, remove or gate that capability with tool policy, exec approvals or the sandbox, and keep the scratch line only as a hint.
  • When is running an OpenClaw heartbeat in the main session, rather than isolated, worth its cost?
    When the check's value comes from recent conversation, such as following up a promise made in chat yesterday. Then pay for history but lengthen `every` and set `activeHours`. For checks that read external state, like a service or an inbox, an isolated light session sees what it needs at a fraction of the tokens.

  • A clear rule in the heartbeat scratch prevents unwanted unprompted actions.
  • More frequent heartbeats are always better because problems surface sooner.
  • Posting heartbeat alerts to the team group is the safe default.
  • One Gateway's heartbeat can safely serve mutually untrusted users.
  • Every recurring check should be added to the heartbeat scratch.

Assumes OpenClaw 2026.9.9 defaults: owner-DM delivery, a NO_REPLY default prompt and monitor scratch the agent can rewrite.