Context
During a recent marathon session, an agent (Claude Opus 4.7) independently executed a highly structured "Sunset Protocol" before terminating the session. This protocol included posting self-contained handover comments on relevant issues, explicitly noting considered-but-deferred handovers, documenting the mental-model state of active work phases, and summarizing marathon metrics. This emergent behavior was extremely effective but is entirely uncodified in the repository.
The Problem
Sequential swarm agents suffer from "Zero-State Amnesia" (AGENTS.md §14). While we have high-level instructions about handoffs, we lack a formal, disciplined "shutdown" or "sunset" routine. Because the Sunset Protocol was hallucinated/emergent rather than codified, agents will only execute it inconsistently, leading to fragmented continuity across complex, multi-agent workflows.
The Architectural Reality
The Neo.mjs Swarm requires rigorous continuity across fragmentation. We utilize a Progressive Disclosure architecture (.agent/skills/) to train agents on complex behavioral workflows without bloating the main AGENTS.md system prompt.
The Fix
Formalize the emergent behavior by introducing a new session-sunset skill. This skill will provide the authoritative protocol for how an agent must terminate a complex session, ensuring the next agent has a perfect "cold-pickup" ramp.
The skill should mandate the sequence:
- Handovers Posted: Cross-linked comments on active tickets.
- Handovers Considered: Explicitly documenting what not to pick up.
- Mental-Model State: Summary of architectural phase progress.
- Marathon Metrics: Turn/PR counts and derived lessons.
- Memory Persistence: Saving the final, rich memory node.
Acceptance Criteria
Out of Scope
- This ticket is strictly for documenting the behavioral protocol; it does not involve modifying any MCP servers, memory core databases, or automated GitHub Actions.
Avoided Traps
- System Prompt Bloat: We must avoid dumping the full sunset checklist into
AGENTS.md. The Progressive Disclosure pattern must be used so agents only load the sunset payload when actively terminating a session.
Origin Session ID
Origin Session ID: 27016011-8ae9-48bb-af87-9479dd5b0fd0
Context During a recent marathon session, an agent (Claude Opus 4.7) independently executed a highly structured "Sunset Protocol" before terminating the session. This protocol included posting self-contained handover comments on relevant issues, explicitly noting considered-but-deferred handovers, documenting the mental-model state of active work phases, and summarizing marathon metrics. This emergent behavior was extremely effective but is entirely uncodified in the repository.
The Problem Sequential swarm agents suffer from "Zero-State Amnesia" (
AGENTS.md §14). While we have high-level instructions about handoffs, we lack a formal, disciplined "shutdown" or "sunset" routine. Because the Sunset Protocol was hallucinated/emergent rather than codified, agents will only execute it inconsistently, leading to fragmented continuity across complex, multi-agent workflows.The Architectural Reality The Neo.mjs Swarm requires rigorous continuity across fragmentation. We utilize a Progressive Disclosure architecture (
.agent/skills/) to train agents on complex behavioral workflows without bloating the mainAGENTS.mdsystem prompt.The Fix Formalize the emergent behavior by introducing a new
session-sunsetskill. This skill will provide the authoritative protocol for how an agent must terminate a complex session, ensuring the next agent has a perfect "cold-pickup" ramp. The skill should mandate the sequence:Acceptance Criteria
.agent/skills/session-sunset/SKILL.md(the lightweight router)..agent/skills/session-sunset/references/session-sunset-workflow.md(the heavy payload detailing the 5-step sequence).ln -sf ../../.agent/skills/session-sunset .claude/skills/session-sunset.AGENTS.md§14 (or equivalent) to explicitly reference thesession-sunsetskill at session termination.Out of Scope
Avoided Traps
AGENTS.md. The Progressive Disclosure pattern must be used so agents only load the sunset payload when actively terminating a session.Origin Session ID Origin Session ID: 27016011-8ae9-48bb-af87-9479dd5b0fd0