How do the top AI agent harnesses handle heartbeats?

Only Hermes Agent documents a feature called a heartbeat: one recurring prompt per session that fires when the session is idle. Claude Code, Codex, Cursor and Antigravity document timers or schedules under other names; the docs read for OpenCode and pi describe none. Read 2026-11-06.

By Mackenzie Bowes · mackenzie@mackenziebowes.com · @_mackenziebowes on X

Contents

Short answer, from the docs read: "heartbeat" is a Hermes Agent term, and only Hermes Agent documents a feature by that name.[1] The idea behind it, waking an agent on a timer with no new message from a person, appears in four more harnesses under other names: Claude Code's /loop and scheduled tasks, Codex's scheduled tasks, Cursor's Automations and Antigravity's SDK triggers.[2][3][4][5] OpenCode's own docs read here describe no scheduler, only a community plugin that adds one.[6] pi's extension docs describe none either.[7] This is the last page in a series that began with a survey of the harnesses, then memory, tool calls and hooks.

This page uses heartbeat in a wide sense: the harness itself starts an agent turn on a timer or on an outside event, without a person typing. A hook that fires after the agent goes idle does not count, because the person or something else still has to start the work.

Hermes Agent is the one named heartbeat

Hermes Agent's /heartbeat gives the current session one recurring instruction. Whenever the session is idle and the interval has elapsed, the prompt fires as a normal user turn, in the same conversation, with the same context and the same prompt cache. A session has one heartbeat. The interval can be as short as 60 seconds. The heartbeat is injected only between turns, never in the middle of a run. Its state survives a restart.[1]

The docs set it against cron, which Hermes also has. A cron job runs in a fresh isolated session on each tick, there can be any number of them, and the scheduler is fully durable. The docs' rule of thumb: if the recurring prompt needs the conversation's context, use /heartbeat; if it is a self-contained job, use cron.[1]

The same idea under other names

Two shapes of the idea

The docs split into two shapes, and the split matters more than the names.

What the comparison rules out

These are consequences of the docs read, not findings from a test.

Terms

Not yet proven

If you run an agent on a timer and the docs left something out, I would like to hear it: mackenzie@mackenziebowes.com.

Sources

  1. Hermes Agent docs, Session Heartbeats (/heartbeat), from a clone at commit 5894e750. Saved 2026-10-23. github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/features/heartbeat.md
  2. Claude Code Docs, Run prompts on a schedule. Read in Rotunda 2026-11-06. code.claude.com/docs/en/scheduled-tasks
  3. OpenAI, Codex docs, Scheduled tasks. Read in Rotunda 2026-11-06. learn.chatgpt.com/docs/automations?surface=app
  4. Cursor Docs, Automations. Read in Rotunda 2026-11-06. cursor.com/docs/cloud-agent/automations
  5. Google Antigravity Docs, Lifecycle hooks, triggers and session persistence. Read in Rotunda 2026-11-06. antigravity.google/docs/sdk/lifecycle/
  6. GitHub, different-ai/opencode-scheduler, a community plugin. Read in Rotunda 2026-11-06; not tested. github.com/different-ai/opencode-scheduler
  7. Pi docs, Extensions. Read in Rotunda 2026-11-06. pi.dev/docs/latest/extensions
  8. Claude Code Docs, Overview. Read in Rotunda 2026-11-06. code.claude.com/docs/en/overview

Terms on this page

  • Tool call: A request from an AI model to run one action, such as a search or a file write, which the surrounding program carries out.