heartbeat
Keep your claim and leases active by sending periodic heartbeats. Automatically extends lease TTL; returns 'stale_claim' if another runner took over.
Instructions
Report that you're still alive and keep your claim + leases fresh.
Long-running agents should call this every few minutes. The runner's
reset_zombies sweep uses heartbeat_at to distinguish healthy
workers from crashed ones. If you hold resource leases (see
requires_locks on your step), the lease expires_at is bumped
by extend_leases_sec from now so the lease reaper won't steal
them out from under you.
Returns {"status": "stale_claim"} if your claim token no longer
matches — this means the zombie reset already repossessed your step.
Stop working immediately if you see that: another runner is
about to pick your step up.
Args:
step_id: Your step ID. Inferred from $SORTIE_STEP_ID if unset.
extend_leases_sec: Seconds of TTL to give every lease you hold.
Default 900 (15 min). Set to 0 for heartbeat-only.
Returns: {"status": "ok" | "stale_claim", "step_id": N}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step_id | No | ||
| extend_leases_sec | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||