openclaw/src
Stanley Huang b83efd4a8a fix: wrap heartbeat run() in try/finally to guarantee timer re-arm
The heartbeat scheduler silently dies after the first batch because
run() has multiple exit paths that skip scheduleNext(). Once any path
returns without re-arming the timer, heartbeats stop permanently.

The most common trigger is the requests-in-flight early return, but
any unhandled rejection in the async chain between runOnce() and the
manual scheduleNext() calls can also kill the timer.

Fix: wrap the run() body in try/finally so scheduleNext() is called
on every exit path. All manual scheduleNext() calls inside are removed
— the finally block is the single re-arm point.

The requests-in-flight case is excluded via a flag because the wake
layer (heartbeat-wake.ts) already handles retry scheduling for this
case with DEFAULT_RETRY_MS. Calling scheduleNext() here would register
a 0ms timer that races with the wake layer's 1s retry.

Fixes #31139
Fixes #45772

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 18:28:06 -07:00
..
acp ACP: sanitize terminal tool titles (#55137) 2026-03-26 14:12:24 +00:00
agents refactor: split subagent run manager 2026-03-27 01:26:07 +00:00
auto-reply fix: use runtime model and per-agent thinking defaults in status (thanks @scoootscooob, @xaeon2026, @ysfbsf) (#55425) 2026-03-26 17:49:21 -07:00
bindings
bootstrap
canvas-host
channels refactor: share directory config listers 2026-03-26 23:20:26 +00:00
chat refactor: split claude cli history import pipeline 2026-03-26 22:12:16 +00:00
cli refactor: finish browser test path cleanup 2026-03-26 23:28:46 +00:00
commands refactor: split channel setup into shared flow modules 2026-03-27 01:17:39 +00:00
compat refactor: remove browser compat shadow tree 2026-03-26 22:53:37 +00:00
config fix: default and gate apply_patch like write 2026-03-27 01:14:42 +00:00
context-engine test: reduce remaining clone seams 2026-03-26 20:01:01 +00:00
cron perf: optimize cold import paths 2026-03-26 23:11:00 +00:00
daemon test: eliminate remaining clone seams 2026-03-26 20:28:36 +00:00
docs
extensions
flows refactor: split channel setup into shared flow modules 2026-03-27 01:17:39 +00:00
gateway fix: keep session settings in gateway live events 2026-03-26 20:11:13 -05:00
generated refactor: finish browser compat untangle 2026-03-26 22:42:41 +00:00
hooks fix: skip session:patch hook clone without listeners 2026-03-25 16:12:39 +05:30
i18n
image-generation Revert "feat: add video generation core infrastructure and extend image generation parameters (#53681)" (#54943) 2026-03-25 23:00:14 -07:00
infra fix: wrap heartbeat run() in try/finally to guarantee timer re-arm 2026-03-26 18:28:06 -07:00
interactive
link-understanding
logging feat(cli): add json schema to cli tool (#54523) 2026-03-26 02:30:32 +03:00
markdown
media refactor: share matrix and telegram dedupe helpers 2026-03-26 15:08:45 +00:00
media-understanding refactor: clean plugin capability boundaries 2026-03-26 21:41:49 +00:00
node-host refactor: remove core browser test duplicates 2026-03-26 23:28:34 +00:00
pairing refactor: align pairing replies, daemon hints, and feishu mention policy 2026-03-25 04:22:53 -07:00
plugin-sdk refactor: move memory engine behind plugin adapters 2026-03-27 00:47:01 +00:00
plugins refactor: move memory engine behind plugin adapters 2026-03-27 00:47:01 +00:00
process fix: trigger compaction on LLM timeout with high context usage (#46417) 2026-03-25 12:51:36 -07:00
routing
scripts
secrets refactor: require legacy config migration on read 2026-03-26 23:23:47 +00:00
security refactor: finish browser compat untangle 2026-03-26 22:42:41 +00:00
sessions
shared refactor: tighten split-runtime live-state guardrails 2026-03-24 21:58:50 -07:00
terminal ACP: sanitize terminal tool titles (#55137) 2026-03-26 14:12:24 +00:00
test-helpers
test-utils perf: speed up test parallelism 2026-03-26 20:09:40 +00:00
tts refactor: require legacy config migration on read 2026-03-26 23:23:47 +00:00
tui fix(ci): restore main green 2026-03-25 16:17:42 -05:00
types
utils fix: stop leaking reply tags in iMessage outbound text (#39512) (thanks @mvanhorn) 2026-03-25 23:00:16 +05:30
web-search
wizard test: reduce remaining clone seams 2026-03-26 20:01:01 +00:00
bundled-web-search-registry.ts
channel-web.ts
docker-build-cache.test.ts
docker-image-digests.test.ts
docker-setup.e2e.test.ts
dockerfile.test.ts
entry.respawn.test.ts
entry.respawn.ts
entry.test.ts
entry.ts
entry.version-fast-path.test.ts
extensionAPI.ts
global-state.ts
globals.ts
index.test.ts
index.ts
install-sh-version.test.ts
library.test.ts perf: optimize cold import paths 2026-03-26 23:11:00 +00:00
library.ts perf: optimize cold import paths 2026-03-26 23:11:00 +00:00
logger.test.ts
logger.ts
logging.ts
param-key.ts
poll-params.test.ts
poll-params.ts
polls.test.ts
polls.ts
runtime.ts
utils.test.ts
utils.ts
version.test.ts
version.ts