// Heartbeat

A proactive, periodic wake-up for the agent.

The heartbeat daemon turns PasClaw into a periodic worker. Every N minutes it reads workspace/heartbeat.md, runs the full agent loop on the file body, and optionally posts the reply to a named channel from config.json. Edits to the file land on the next tick without restarting the daemon.

Off by defaultPer-tick reloadChannel postCCR condensation
01

Opt-in by design

The subsystem is gated on a heartbeat block in config.json (enabled, interval_mins, channel). Without it, pasclaw heartbeat refuses to start unless --force is passed, and pasclaw onboard asks before enabling it.

02

File-driven prompts

Each tick re-reads workspace/heartbeat.md from disk and runs its body as the user message. An empty or missing file skips the tick — no spurious model calls when there is nothing to do.

03

Reversible condensation (CCR)

Destructive condensers (JSON shrink, shell-output filters) stash the original tool output under a fresh tool_output_get handle and append a footer naming it, so the model defaults to the structural view but can recall verbatim bytes via one tool call.

04

Use cases

Hourly staging-build red checks, six-hour GitHub issue mention summaries to Slack, every-30-minute kb sync diffs — all delivered through the standard channels surface.

From the documentation

Technical details

Implementation notes drawn from the PasClaw repository documentation.

Config gate

The heartbeat subsystem refuses to start without an explicit configuration block.

"heartbeat": {
  "enabled": true,
  "interval_mins": 30,
  "channel": "ops"
}

Reversible condensation

Destructive condensers stash the original output under a tool_output_get handle and append a footer naming it, so the model can recall the verbatim bytes when needed.

  • Empty or missing heartbeat.md skips the tick.
  • Each tick re-reads the file so edits land on the next cycle.
  • Replies route through the same channel format as send_message.

Source documentation

Common questions

Frequently asked questions

Keep exploring

See how the rest of PasClaw fits together.

Docker shell backend