Repository navigation
Description
Follow-up to #84332 (locked, can't comment) — heartbeat fork bug is still firing on 2026.5.26. Commit cce0049 either didn't ship in this release or isn't catching the case.
Original bug closed as fixed via PR #83647 on 2026-05-19. I upgraded from 2026.5.3-1 to 2026.5.26 last night (2026-05-27 ~18:41 BST). Same behaviour.
Mitigation we're running
Local LaunchAgent com.openclaw.paige.fork-watchdog polls ps every 60s for claude --resume processes. When exactly two are present it SIGTERMs the younger one. Source: bin/fork-watchdog.py in our workspace.
Since the upgrade the watchdog has detected and killed 15 forks in ~15 hours of active WhatsApp use (Paige is on a WhatsApp DM channel through the gateway).
Version
OpenClaw 2026.5.26 (10ad3aa)
Frequency
- 15 forks killed, 2026-05-27T19:30 BST → 2026-05-28T09:32 BST
- Roughly one per hour of active use
- No idle gaps long enough to claim the bug was "off" at any point
First three forks post-upgrade
[2026-05-27T19:30:34] FORK DETECTED: keep PID 26708 (etime 10:13), kill PID 27029 (etime 00:18)
[2026-05-27T19:45:36] FORK DETECTED: keep PID 26708 (etime 25:15), kill PID 28004 (etime 00:12)
[2026-05-27T20:45:42] FORK DETECTED: keep PID 29055 (etime 11:59), kill PID 29408 (etime 00:18)
Most recent three
[2026-05-28T08:30:58] FORK DETECTED: keep PID 50161 (etime 00:58), kill PID 50197 (etime 00:32)
[2026-05-28T08:54:01] FORK DETECTED: keep PID 50500 (etime 13:04), kill PID 51179 (etime 00:16)
[2026-05-28T09:32:05] FORK DETECTED: keep PID 50500 (etime 51:08), kill PID 52422 (etime 00:48)
Killed PID etime is always seconds-to-a-minute. Kept PID is always the older one with real conversation context — same shape as the original bug.
Asks
- Can you confirm whether commit
cce0049actually shipped in2026.5.26? A quick release-notes check should answer it. If it didn't ship, that explains everything and I'll wait for the next tagged release. - If
cce0049IS in2026.5.26— there's a code path it isn't catching. Happy to share the full watchdog log, the gateway log windows around each fork event, or run a small repro script. Tell me what would be most useful.
Without the watchdog this is end-user-visible: duplicated replies, context-amnesia replies on busy threads. With it, the duplicates get killed within 60s but the underlying spawn is still happening every ~hour.
Appreciated the quick turnaround on the original — happy to help debug this round too.
— Dan
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 28, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Close as implemented on current main: the merged heartbeat scheduler/reply-admission fix now defers scheduled heartbeats behind same-agent active work and converts heartbeat admission races into retryable busy skips, which addresses the reported parallel Claude live-session fork path.
I found the merged PR that appears to have closed this: #88970: fix #85871: [Bug]: Heartbeat scheduler silently fails to fire on 5.20 and all 5.x versions (regression from 4.23).
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Close as current-main implemented and ask for a new report or reopen only with fork logs from a build containing PR #88970's fix.
Do we have a high-confidence way to reproduce the issue?
No high-confidence failing current-main reproduction was established; the old failure path is source-reproducible from the issue logs and PR #88970's admission-race fix, while current main now contains the relevant guards.
Is this the best way to solve the issue?
Yes; the implemented fix is at the correct scheduler/reply-admission boundary because heartbeat background work now retries when the session or same-agent lane is busy instead of spawning or counting a skipped model turn as complete.
Security review:
Security review: This issue is not a security-sensitive report and no PR diff is under review.
AGENTS.md: found and applied where relevant.
What I checked:
src/routing/session-key.ts:223, 86a28636fa80)src/infra/heartbeat-runner.ts:1373, 86a28636fa80)src/infra/heartbeat-runner.ts:1811, 86a28636fa80)src/auto-reply/reply/reply-turn-admission.ts:82, 86a28636fa80)src/auto-reply/reply/dispatch-from-config.ts:1356, 86a28636fa80)src/infra/heartbeat-runner.skips-busy-session-lane.test.ts:260, 86a28636fa80)Likely related people:
src/infra/heartbeat-runner.ts,src/auto-reply/reply/agent-runner.ts,src/auto-reply/reply/reply-operation-run-state.ts)src/infra/heartbeat-runner.ts,src/auto-reply/reply/agent-runner.ts)src/infra/heartbeat-runner.ts,src/infra/heartbeat-runner.skips-busy-session-lane.test.ts,src/commands/doctor/shared/legacy-config-migrate.test.ts)src/infra/heartbeat-runner.ts)Codex review notes: model internal, reasoning high; reviewed against 86a28636fa80; fix evidence: merged PR #88970, commit 2196ea29304a, main fix timestamp 2026-06-16T06:17:37Z.