Independent OpenClaw reporting, releases, guides, and community coverage
OpenClaw News

OpenClaw Fixes Heartbeat Hot Reload for Gateways

OpenClaw Gateway heartbeat cadence changes now reach the live cron monitor immediately, without requiring a full restart.

Filed under Posts 2 min read Updated Aug 16, 2026
OpenClaw Fixes Heartbeat Hot Reload for Gateways

OpenClaw merged PR #124410, fixing a Gateway hot-reload bug where heartbeat cadence changes appeared to apply but did not reach the live cron monitor until a full restart.

This is a good operational fix because the failure was quiet. An operator could update agents.defaults.heartbeat.every, see a successful "config hot reload applied" log entry, and still have the live monitor running on the old cadence.

What Broke

The issue lived in the lazy Gateway cron proxy. Its GatewayCronState omitted several lifecycle hooks, including the hook responsible for reconciling heartbeat jobs. Because those hooks were typed as optional, reload call sites used optional chaining and silently skipped reconvergence when the lazy proxy lacked a method.

That meant config surfaces routed through the restart-heartbeat reload rule could become no-ops on lazily started gateways. The most visible example was heartbeat cadence, but the PR notes that related reload paths such as models and agents.entries could also depend on the same reconvergence contract.

What The Fix Does

PR #124410 makes the lifecycle hooks required on GatewayCronState and forwards them through the lazy proxy to the underlying cron service. Where reconvergence must apply, the proxy loads the service on demand.

The reload call sites also drop the optional ?. guards. That gives the compiler a chance to catch future missing-hook implementations instead of letting them degrade into silent runtime skips.

Operator Impact

After this change, heartbeat cadence updates should take effect immediately on Gateway config hot reload. Operators do not need to restart the Gateway just to make the live heartbeat monitor pick up a new interval.

The PR also clarifies one adjacent boundary: openclaw doctor heartbeat-cadence repair is a separate path that persists monitor rows through its own cron service. This fix is specifically about live Gateway hot reload.

Validation

The author reports red-before and green-after regression coverage in server-cron-lazy.test.ts, plus focused Gateway reload suites passing after rebase. The combined focused run covered 260 tests across lazy cron, reload handlers, hot-reload status, request context, and MCP connection resolver behavior.

This patch is small in production code but meaningful in reliability terms: it changes a misleading success into an actual live-state update.

Why It Matters

Heartbeat cadence is one of those agent settings where operator trust depends on immediate feedback matching actual behavior. If the UI or logs say a reload applied, the monitor should reconverge. OpenClaw now enforces that contract at the type boundary and the runtime proxy boundary.

Daily Briefing

Get the Open-Source Briefing

The stories that matter, delivered to your inbox every morning. Free, no spam, unsubscribe anytime.

Join 45,000+ developers. No spam. Unsubscribe anytime.