# Your OpenClaw heartbeat re-buys the same answer. Replay it at 0 tokens.

> A heartbeat that re-reasons the same check every 15 minutes bills 2,880 model calls a month. Record the deterministic half once, replay it for free, and wake the model only on drift.

Markdown twin of https://www.reelier.com/for/openclaw — deterministic replay for OpenClaw. Reelier records what an agent actually did, compiles it into a SKILL.md with an assertion per step, and replays it at 0 LLM tokens with a receipt every run.

## How capture works on OpenClaw

`reelier scan` includes OpenClaw's directory in its source list, alongside `~/.claude` and the other agent dirs. Honest caveat: transcripts that don't match the Claude-style JSONL schema parse to 0 replayable sessions today — scan skips what it doesn't recognize rather than fabricating a result.

The dependable capture path is the recording proxy: front the MCP server(s) the heartbeat job uses with `reelier mcp --wrap`, let the job run once, compile the trace. Wrap captures lossless traces (tool annotations included) — scan-from-history is a reconstruction; wrap is the recording.

Then the heartbeat itself becomes a replay plus a gate: `reelier run` at 0 tokens, `reelier diff` exits 1 on drift, and only that exit code wakes the model.

`reelier scan` reads: `~/.openclaw`
(The literal directory scan reads for OpenClaw (reelier/src/scan.ts). Unrecognized transcript formats contribute 0 replayable sessions — honest degradation, never a crash.)

## Wire it up

### terminal — vendor the skill from the repo

```sh
curl -fsSL --create-dirs https://raw.githubusercontent.com/seldonframe/reelier/main/clawhub/reelier/SKILL.md \
  -o skills/reelier/SKILL.md
```

The bundle is `clawhub/reelier/` in the Reelier repo. It declares no required env vars — Reelier needs no API key — and only `reelier`/`npx` as binaries. It's submitted to ClawHub (slug `reelier`) but the listing is still pending publication as of 2026-07-21, so `clawhub install reelier` doesn't resolve yet; vendor from the repo until it's live.

### heartbeat job — replay, wake the model only on drift

```sh
npx -y reelier run my-job.skill.md && npx -y reelier diff my-job
# exit 0 -> job done, 0 tokens, receipt written — stop here
# exit 1 -> something real changed: investigate with the LLM,
#           re-record, and let the next heartbeat replay again
```

Every run leaves a receipt — per-step outcomes, timing, token count [measured] — so “the cron ran” is provable, not claimed.

## First receipt in 60 seconds

1. Vendor the skill from the repo (block above) — it teaches the agent the record → replay → diff loop and its honesty rules.
2. Record the job once: wrap the MCP server(s) it uses with `npx -y reelier mcp --wrap "<command>"`, or freeze it from a session with `reelier scan` + `reelier from-session`.
3. `npx -y reelier compile .reelier/traces/<name>.jsonl -o my-job.skill.md` — Compile the recorded trace into a skill with an assertion per step.
4. `npx -y reelier run my-job.skill.md && npx -y reelier diff my-job` — Put the pair in the heartbeat. Exit 0: done at 0 tokens. Exit 1: something drifted — that's when the model earns its bill.

## A real receipt

Verbatim output of a portfolio replay, run on 2026-07-21 with the CLI pinned to the version that recorded the seed (`npx -y reelier@0.12.1`, so it reproduces verbatim). The run record confirms passed: true and 0 LLM tokens. Replay it yourself:

```
npx -y reelier@0.12.1 run examples/portfolio/registry-latest.skill.md

=== registry-latest ===
✓ Step 1 — Latest dist-tag from the registry [passed] 152ms

PASSED: 1/1 steps ok, 0 failed, 152ms total
```

## FAQ

**What does a heartbeat actually cost?**

OpenClaw's documented default is a heartbeat every 30 minutes — 1,440 model calls a month; a 15-minute cadence is 2,880. Press coverage documented heartbeat requests carrying ~120,000 tokens of context, which at Opus 4.8's $5.00/MTok input price is about $0.60 a call — roughly $1,728 a month at 15-minute cadence, input side alone, mostly to hear “nothing to do”. A replayed check is 0 tokens, measured on every receipt.

→ [The full math, sourced, with a real receipt](https://www.reelier.com/blog/openclaw-cron-costs)

**Which half of the job can be replayed?**

The re-derivation half: the same tool calls, same shape, same kind of answer every run — status checks, data pulls, report generation, CRUD sequences. Judgment work (triaging an anomaly, writing prose, deciding what to do about drift) still needs a model every time, and Reelier doesn't pretend otherwise. Replay the check for free; spend tokens only when the check fails.

**What license is the ClawHub skill under?**

The ClawHub skill bundle (`clawhub/reelier/` in the repo) is MIT-0, because ClawHub does not honor per-skill license overrides. That covers only the SKILL.md documentation bundle — the Reelier engine in the repository stays AGPL-3.0.

## Links

- [Your OpenClaw cron burns 2,880 LLM calls a month. Here's the same job at zero.](https://www.reelier.com/blog/openclaw-cron-costs)
- [Scheduled agents re-learn the job every run. Replay the part that never changes.](https://www.reelier.com/blog/scheduled-agents-zero-token)
- [Agent cost calculator — what re-reasoning a recurring job costs, with your numbers.](https://www.reelier.com/tools/agent-cost-calculator)
- [seldonframe/reelier — the engine, AGPL-3.0. Fork it, audit it, self-host it.](https://github.com/seldonframe/reelier)

Other agents: [Claude Code](https://www.reelier.com/for/claude-code) · [Cursor](https://www.reelier.com/for/cursor) · [Codex](https://www.reelier.com/for/codex) · [Windsurf](https://www.reelier.com/for/windsurf) · [Hermes](https://www.reelier.com/for/hermes)
