Context
As part of Epic #10311 (Swarm Autonomy Phase 1), we are introducing a conscious-layer heartbeat (swarm-heartbeat.sh) that polls the environment and wakes active terminal sessions if there's work or a SESSION_FULL state.
The Problem
Polling and waking agents across multiple sessions implies frequent MCP tool calls and possibly LLM inferences. Without an empirical token-economy anchor, we cannot accurately define the cost constraints of the sleep-cycle MVP. For example, 5 minutes × 24 hours × 2 agents = 576 idle wakes/day. The per-heartbeat overhead must be measured to safely scale the recycle-frequency.
The Fix
- Measure the token cost and MCP invocation overhead for a single confirmed-empty heartbeat cycle.
- Establish a token-economy budget for idle wakes.
- Determine the optimal frequency for the cron heartbeat (e.g. 5 minutes vs. 15 minutes) based on this budget.
Acceptance Criteria
Origin Session ID: dd277d9c-8f9c-44c7-8607-cb68bc42fac0
Context
As part of Epic #10311 (Swarm Autonomy Phase 1), we are introducing a conscious-layer heartbeat (
swarm-heartbeat.sh) that polls the environment and wakes active terminal sessions if there's work or aSESSION_FULLstate.The Problem
Polling and waking agents across multiple sessions implies frequent MCP tool calls and possibly LLM inferences. Without an empirical token-economy anchor, we cannot accurately define the cost constraints of the sleep-cycle MVP. For example, 5 minutes × 24 hours × 2 agents = 576 idle wakes/day. The per-heartbeat overhead must be measured to safely scale the recycle-frequency.
The Fix
Acceptance Criteria
Origin Session ID: dd277d9c-8f9c-44c7-8607-cb68bc42fac0