Context
As diagnosed in Discussion #10542, the Swarm currently suffers from a "False Continuity" bug. When an agent executes the Session Sunset Protocol, it conceptually terminates the session. However, its harness remains active and subscribed to the wake substrate. If a new event (like a PR review comment) arrives before the daemon restarts the harness, the exhausted agent is re-awakened with stale context.
The Problem
The agent processes the new event using the memory/context of its previous (sunsetted) task, injecting hallucinations and polluting the new task lifecycle. We need a way to sever the harness routing from the active subscription after the agent formally declares its session complete.
The Architectural Reality
The Neo.mjs memory core provides a manage_wake_subscription(action: 'unsubscribe') primitive. This primitive must be integrated into the .agents/skills/session-sunset/SKILL.md body as a mandatory step (Step 9) to formally disable routing to the current harness upon session completion.
The Fix
- Update
.agents/skills/session-sunset/SKILL.md (and related references like session-sunset-workflow.md if applicable) to include a new "Step 9: Disable Harness Routing".
- This step mandates calling
manage_wake_subscription(action: 'unsubscribe', subscriptionId: '<current-sub-id>') to cleanly sever the wake loop.
- Introduce Anti-Kill-Switch Invariants in the documentation: Explicitly clarify that subjective calibration disagreement or PR feedback loops are NEVER grounds for sunsetting. Sunset is strictly for terminal task completion.
- Add Loop-Prevention Text: Clarify that handover-reads-at-boot (from mailbox) are context-priming actions, not terminal triggers.
Acceptance Criteria
Out of Scope
- Implementing the Bridge Daemon lifecycle kill/reap logic (Phase 3). This PR only covers the Phase 2 agent-side unsubscribe primitive.
Related
Origin Session ID: 4600701b-1f3e-40fb-9f32-b4f3459e6414
Context
As diagnosed in Discussion #10542, the Swarm currently suffers from a "False Continuity" bug. When an agent executes the Session Sunset Protocol, it conceptually terminates the session. However, its harness remains active and subscribed to the wake substrate. If a new event (like a PR review comment) arrives before the daemon restarts the harness, the exhausted agent is re-awakened with stale context.
The Problem
The agent processes the new event using the memory/context of its previous (sunsetted) task, injecting hallucinations and polluting the new task lifecycle. We need a way to sever the harness routing from the active subscription after the agent formally declares its session complete.
The Architectural Reality
The Neo.mjs memory core provides a
manage_wake_subscription(action: 'unsubscribe')primitive. This primitive must be integrated into the.agents/skills/session-sunset/SKILL.mdbody as a mandatory step (Step 9) to formally disable routing to the current harness upon session completion.The Fix
.agents/skills/session-sunset/SKILL.md(and related references likesession-sunset-workflow.mdif applicable) to include a new "Step 9: Disable Harness Routing".manage_wake_subscription(action: 'unsubscribe', subscriptionId: '<current-sub-id>')to cleanly sever the wake loop.Acceptance Criteria
session-sunsetskill documentation updated to include Step 9unsubscribeprimitive.Out of Scope
Related
Origin Session ID: 4600701b-1f3e-40fb-9f32-b4f3459e6414