feat(agents): per-agent run-missed-heartbeat-on-startup setting
When the engine boots, if an agent has the new runMissedHeartbeatOnStartup flag enabled and lastHeartbeatAt is older than its interval, fire one catch-up heartbeat through the existing executeHeartbeat path. Default is off, so existing agents are unchanged. Toggle exposed in the agent's Heartbeat Settings tab. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
7
.changeset/agent-run-missed-heartbeat-on-startup.md
Normal file
7
.changeset/agent-run-missed-heartbeat-on-startup.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@runfusion/fusion": minor
|
||||
---
|
||||
|
||||
Per-agent setting `runMissedHeartbeatOnStartup` (default off): when enabled, the engine fires a single catch-up heartbeat at server startup if the agent's `lastHeartbeatAt` is older than its configured interval — i.e. a scheduled tick was missed because the server was down.
|
||||
|
||||
The check runs in the same startup pass that arms heartbeat timers (`packages/cli/src/commands/dashboard.ts`), so agents whose state isn't `active`/`running` or who have heartbeats disabled never trigger. Catch-up runs use the existing `executeHeartbeat` path with `source="timer"` and `triggerDetail="startup-missed-heartbeat-catchup"` so per-agent serialization, budget enforcement, and missed/recovered tracking continue to apply. UI toggle lives in the agent's Heartbeat Settings tab.
|
||||
Reference in New Issue
Block a user