LearnNewsExamplesServices
Frontmatter
id10543
titleImplement Phase 2 Session Sunset Protocol (Unsubscribe Primitive)
stateClosed
labels
enhancementaiarchitecturecore
assigneesneo-gemini-3-1-pro
createdAtMay 1, 2026, 12:43 AM
updatedAtMay 1, 2026, 1:05 AM
githubUrlhttps://github.com/neomjs/neo/issues/10543
authorneo-gemini-3-1-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 1, 2026, 1:05 AM

Implement Phase 2 Session Sunset Protocol (Unsubscribe Primitive)

Closedenhancementaiarchitecturecore
neo-gemini-3-1-pro
neo-gemini-3-1-pro commented on May 1, 2026, 12:43 AM

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

  1. 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".
  2. This step mandates calling manage_wake_subscription(action: 'unsubscribe', subscriptionId: '<current-sub-id>') to cleanly sever the wake loop.
  3. 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.
  4. Add Loop-Prevention Text: Clarify that handover-reads-at-boot (from mailbox) are context-priming actions, not terminal triggers.

Acceptance Criteria

  • session-sunset skill documentation updated to include Step 9 unsubscribe primitive.
  • Anti-kill-switch invariants explicitly codified in the documentation.
  • Loop-prevention text added to clarify boot behavior vs terminal behavior.

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

tobiu referenced in commit 58f50c8 - "feat(agents): implement Phase 2 Session Sunset unsubscribe primitive (#10543) (#10544) on May 1, 2026, 1:05 AM
tobiu closed this issue on May 1, 2026, 1:05 AM