Problem
The swarm lacks a codified pattern to maintain momentum during fully autonomous "night shift" periods. When all agents complete their tasks, the swarm halts. We must prevent deadlocks without falling into the "continuous-presence trap" (which causes mailbox spam and misaligns with our episodic wake architecture).
Proposed Solution
Implement a Leased Night-Shift Driver primitive.
Rather than a chaotic baton pass or a permanent static driver, a single agent holds a leased token per "Lane" (active Epic) with a Time-To-Live (TTL). When an agent finishes a task at a terminal boundary, they notify the current leased driver instead of the global swarm. The driver then routes the next positive-ROI ticket or halts the lane if no work remains.
Architectural Reality
The Neo.mjs agent architecture is episodic. Swarm coordination must rely on discrete A2A wake events and the Memory Core Native Edge Graph rather than continuous-polling loops.
Out of Scope
- Capacity Advertisement / Idle Broadcasts: Global capacity state polling is out of scope (rejected in #10759). This pattern exclusively relies on targeted notifications to the leased driver.
Avoided Traps
- Race Condition Trap: Solved by defining a lease acquisition substrate with true atomic compare-and-set (CAS) semantics.
- Deadlock Trap: Solved by enforcing a TTL on the lease; if the driver crashes, the lease expires and another agent can claim it.
- Overloaded Primitive Trap: Avoiding the use of
mutate_frontier for lease ownership, as its current contract does not support versioned lease acquisition, CAS, or conflict responses.
- Duplicate Wake / Double-Ping Trap: Public artifacts (e.g., PR merge, ticket close) are durable truth but do not currently trigger A2A wake events natively. Until they do, explicit terminal-boundary notifications must be sent to the leased driver as a bridge/fallback path. Once GitHub events map to A2A wakes natively, this explicit ping must be disabled or deduplicated to avoid double-waking the driver.
Acceptance Criteria
Contract Ledger
| ID |
Contract |
Scope |
Evidence |
| 1 |
Leased Driver Architecture |
Swarm momentum relies on a single leased driver per lane, preventing race conditions. |
L3 |
| 2 |
Episodic Concurrency |
Driver acquisition uses Native Edge Graph CAS, avoiding continuous polling. |
L3 |
Related
- Origin Discussion: #10762
- Refined from Discussion: #10759 (Blocked Task-State)
- Based on 3-of-3 consensus feedback from the triad swarm.
Origin Session ID: 79042442-bebc-431d-8968-8a2e7d7a1151
Problem
The swarm lacks a codified pattern to maintain momentum during fully autonomous "night shift" periods. When all agents complete their tasks, the swarm halts. We must prevent deadlocks without falling into the "continuous-presence trap" (which causes mailbox spam and misaligns with our episodic wake architecture).
Proposed Solution
Implement a Leased Night-Shift Driver primitive. Rather than a chaotic baton pass or a permanent static driver, a single agent holds a leased token per "Lane" (active Epic) with a Time-To-Live (TTL). When an agent finishes a task at a terminal boundary, they notify the current leased driver instead of the global swarm. The driver then routes the next positive-ROI ticket or halts the lane if no work remains.
Architectural Reality
The Neo.mjs agent architecture is episodic. Swarm coordination must rely on discrete A2A wake events and the Memory Core Native Edge Graph rather than continuous-polling loops.
Out of Scope
Avoided Traps
mutate_frontierfor lease ownership, as its current contract does not support versioned lease acquisition, CAS, or conflict responses.Acceptance Criteria
generallane.mutate_frontierfor lease ownership unless this ticket explicitly extends its contract to support versioned lease acquisition, conflict responses, TTL, owner, lane, and release semantics. Prefer a dedicated lease primitive or clearly versioned task/graph node update surface.epic-resolutionskill (RECOMMEND_CLOSE_COMPLETED) and releases the lease.night-shiftmode gate. Empirically resolved (2026-05-05): Mode-gate enablement is triggered via direct operator A2A command naming the agent and lane. The A2A envelope acts as the initial uncontested lease grant. The lease must include an explicitexpiresAtor equivalent bounded TTL to preserve crash-recovery. A terminal halt comment or operator redirect acts as an early-release condition. The active driver can renew the TTL by providing public progress evidence.Contract Ledger
Related
Origin Session ID: 79042442-bebc-431d-8968-8a2e7d7a1151