5dive 0.1.16 — heartbeat
Heartbeat — wake agents only when they have queued tasks
A per-agent scheduler that ties wake-ups to the shared task queue. Agents with no todo work never wake (zero tokens, 5h usage window untouched); when they do have work, they're nudged to do exactly one task per tick, then idle.
Commands
5dive heartbeat on <name> [--every=30m] [--no-fresh]— enrol5dive heartbeat off <name>— disable5dive heartbeat ls— enrolled agents + next-wake + queued count5dive heartbeat tick— root cron driver
Behaviour per tick (per enrolled agent)
- already
in_progress→ skip (no pile-on) - no
todo→ do nothing - has
todo+ due → ensure running,/clear(default), inject ONE nudge
fresh flag (default on)
Sends /clear before the nudge so each task starts from a clean conversation. The agent process itself stays running between ticks — no cold-start cost. --no-fresh keeps the running conversation across tasks.
Cron (root)
*/5 * * * * /usr/local/bin/5dive heartbeat tick >> /var/log/5dive-heartbeat.log 2>&1
Wired into the registry as .agents[<name>].heartbeat = {enabled, everyMin, fresh, lastRunAt} and surfaced in agent list --json for dashboard use.