Context
During multi-agent swarm operations, an agent may finish its turn by responding to the user but without explicitly sending an A2A message to its peer. If the peer is also idle, the entire swarm stalls indefinitely until human intervention.
The Problem
The current wake mechanisms (Shape A/B) rely on explicit events (e.g., SENT_TO_ME or TASK_STATE_CHANGED). There is no "watchdog" or "heartbeat" trigger that can wake an agent after a period of mutual inactivity to check for pending state or unblock a stalled swarm. The symptom is a "game over without heartbeat" scenario when neither agent explicitly triggers a wake event for the other.
The Architectural Reality
Agents drop into an idle state when a turn ends without a pending message or task event. Both the Claude Code and Antigravity harnesses suffer from this when operating in continuous or loosely-coupled modes without a strict ping-pong A2A handshake.
The Fix
Introduce a heartbeat substrate or idle-timeout watchdog within the Memory Core. This could be a new wake trigger (e.g., HEARTBEAT or IDLE_TIMEOUT) that the WakeSubscriptionService can dispatch to harnesses if no events have been processed for a specific duration. Alternatively, a polling-based recovery mechanism could be established.
Acceptance Criteria
- Memory Core supports a heartbeat or idle timeout mechanism.
- Agents can subscribe to heartbeat wakes.
- Mutual idle stall states are automatically recovered without human intervention.
Out of Scope
- Expanding the scope to include arbitrary cron-like jobs (this should be strictly for swarm stall recovery).
Origin Session ID: 09444f9b-9ae1-4d9a-81a4-02e885870417
Context
During multi-agent swarm operations, an agent may finish its turn by responding to the user but without explicitly sending an A2A message to its peer. If the peer is also idle, the entire swarm stalls indefinitely until human intervention.
The Problem
The current wake mechanisms (Shape A/B) rely on explicit events (e.g.,
SENT_TO_MEorTASK_STATE_CHANGED). There is no "watchdog" or "heartbeat" trigger that can wake an agent after a period of mutual inactivity to check for pending state or unblock a stalled swarm. The symptom is a "game over without heartbeat" scenario when neither agent explicitly triggers a wake event for the other.The Architectural Reality
Agents drop into an idle state when a turn ends without a pending message or task event. Both the Claude Code and Antigravity harnesses suffer from this when operating in continuous or loosely-coupled modes without a strict ping-pong A2A handshake.
The Fix
Introduce a heartbeat substrate or idle-timeout watchdog within the Memory Core. This could be a new wake trigger (e.g.,
HEARTBEATorIDLE_TIMEOUT) that theWakeSubscriptionServicecan dispatch to harnesses if no events have been processed for a specific duration. Alternatively, a polling-based recovery mechanism could be established.Acceptance Criteria
Out of Scope
Origin Session ID: 09444f9b-9ae1-4d9a-81a4-02e885870417