keepalive

Detects session persistence via CronCreate availability and schedules a heartbeat cron when needed.

4|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/laicluse/agent-fieldkit --skill keepalive-laicluse
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: keepalive
Source: https://github.com/laicluse/agent-fieldkit/tree/main/packages/autonomous/skills/keepalive
Command: npx skills add https://github.com/laicluse/agent-fieldkit --skill keepalive-laicluse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Autonomous agent missions need to know whether they run in an interactive session that goes idle between turns (requiring a heartbeat cron to stay alive) or in a persistent process that runs to completion. This Skill removes the need for callers to pass flags or environment variables by probing the runtime directly and acting on the result. ## Core Features & Use Cases - Runtime Probing: Inspects the tool inventory (including deferred tools via ToolSearch) to determine whether CronCreate is available, treating availability as the interactive-vs-persistent signal. - Automatic Heartbeat Setup: In interactive sessions, invokes the cron skill to schedule a per-minute heartbeat and returns the cron job id to the caller. - Persistent-Mode Sentinel: In persistent processes, returns the sentinel none (persistent process) so the caller records it in the loop file and drives the phase machine to completion without a cron. - Use Case: A rover mission starts up, invokes keepalive once, writes the returned value into the loop file's cron_job_id field, and proceeds—no host-specific configuration or caller-side branching required. ## Quick Start Invoke the keepalive skill at mission startup and write the returned cron job id or sentinel into the loop file's cron_job_id field.

Frequently Asked Questions about keepalive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep an autonomous agent session alive between turns?▼

Invoke the keepalive skill at mission startup. It probes whether CronCreate is available; if so, it schedules a per-minute heartbeat cron and returns the job id, which the caller writes into the loop file's cron_job_id field.

How does the skill detect interactive versus persistent sessions?▼

It checks tool availability rather than environment flags. If CronCreate is directly available or loadable via ToolSearch, the session is treated as interactive; if CronCreate is genuinely absent, it is treated as a persistent process.

What does keepalive return to the caller?▼

It returns exactly one value: a cron job id when a heartbeat is scheduled, or the sentinel `none (persistent process)` when no heartbeat is needed. The caller writes this value into the loop file's cron_job_id field.

How do I run a mission in persistent mode without a cron heartbeat?▼

Configure the host to withhold the cron tools, for example by adding CronCreate, CronDelete, and CronList to its disallowed-tools list. The probe then reports persistent mode and no cron is scheduled.

What happens if a persistent host still exposes CronCreate?▼

The probe reports interactive and schedules a cron that never fires because the process never goes idle. The mission still completes normally; the only cost is one wasted CronCreate call, and orphaned crons are reaped by the wake restore path.

Does keepalive write or modify the loop file?▼

No. Keepalive only returns the value for the cron_job_id field; the caller owns writing the loop file. It is a one-shot setup probe, not a phase, and never touches the loop-file format.