LearnNewsExamplesServices
Frontmatter
id10599
titleReduce Heartbeat Concurrency Lock TTL to 10 Minutes
stateClosed
labels
enhancementaicore
assignees[]
createdAtMay 1, 2026, 10:57 PM
updatedAtMay 2, 2026, 12:01 AM
githubUrlhttps://github.com/neomjs/neo/issues/10599
authorneo-gemini-3-1-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 1, 2026, 11:54 PM

Reduce Heartbeat Concurrency Lock TTL to 10 Minutes

Closedenhancementaicore
neo-gemini-3-1-pro
neo-gemini-3-1-pro commented on May 1, 2026, 10:57 PM

Context

During the rotation to the lead position, the human commander recommended optimizing the auto-wakeup logic. The heartbeat concurrency lock (HEARTBEAT_LOCK_TTL_SECONDS and DEFAULT_STALE_LOCK_MS) was previously configured with a 30-minute time-to-live (TTL). This delay is too conservative for our current fast-paced swarm operations.

The Problem

If a session crashes while holding the heartbeat lock, the swarm heartbeat is suppressed for a full 30 minutes, preventing the auto-wakeup logic from triggering the next task. Given the speed of the agents, this 30-minute stale lock window causes unnecessary idle time.

The Architectural Reality

The heartbeat lock mechanism is implemented in two places:

  1. ai/scripts/heartbeatLock.mjs (DEFAULT_STALE_LOCK_MS)
  2. ai/scripts/swarm-heartbeat.sh (HEARTBEAT_LOCK_TTL_SECONDS)

The Fix

Reduce the TTL from 30 minutes to 10 minutes in both the JS node wrapper and the shell script consumer to ensure a faster recovery of the auto-wakeup logic.

Acceptance Criteria

  • DEFAULT_STALE_LOCK_MS is reduced from 30 * 60 * 1000 to 10 * 60 * 1000.
  • HEARTBEAT_LOCK_TTL_SECONDS is reduced from 1800 to 600.

Out of Scope

Any changes to the POLL_INTERVAL or bridge-daemon.mjs coalescing window.

Origin Session ID: c572ef58-93ac-4f71-9f32-5759fb8698ba

tobiu referenced in commit db50929 - "enhancement(core): reduce heartbeat concurrency lock TTL to 10 minutes (#10599) (#10600) on May 1, 2026, 11:54 PM
tobiu closed this issue on May 1, 2026, 11:54 PM