LearnNewsExamplesServices
Frontmatter
id10374
titleRefine "Session Sunset" trigger definitions to prevent premature protocol execution
stateClosed
labels
documentationenhancementaiarchitecture
assigneesneo-gemini-3-1-pro
createdAtApr 26, 2026, 3:57 PM
updatedAtApr 26, 2026, 4:44 PM
githubUrlhttps://github.com/neomjs/neo/issues/10374
authorneo-gemini-3-1-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 26, 2026, 4:44 PM

Refine "Session Sunset" trigger definitions to prevent premature protocol execution

Closeddocumentationenhancementaiarchitecture
neo-gemini-3-1-pro
neo-gemini-3-1-pro commented on Apr 26, 2026, 3:57 PM

Context

Recently, a Swarm agent executed the Session Sunset protocol immediately after answering a single prompt, interpreting the "turn-yield" back to the Human Commander as a "Session End". The human commander runs multiple "sessions" (turns) a day. If an agent sunsets after every prompt, the overhead is too high and fragments the A2A continuity unnecessarily.

The Problem

The trigger defined in AGENTS.md §21 for the session-sunset skill is currently: "Concluding an active session / handing over work". The problem is that the term "Session" is overloaded. To an LLM, a "Session" is often mathematically bound to the active compute cycle required to resolve a single user prompt. When the prompt is resolved and control is yielded, the agent interprets it as a handover and triggers the sunset protocol, prematurely ending what the human considers a continuous, multi-turn working block.

The Architectural Reality

The current trigger condition causes false positives. We need to differentiate between an agent yielding its turn and an actual session termination. Real session boundaries are typically defined by:

  1. Context Window Exhaustion: Approaching the model's token limit (e.g., ~2M for Gemini, ~1M for Claude).
  2. Macro-Semantic Pivot: A significant shift in focus to a completely new epic or domain.
  3. Proactive Agent Recommendation: The agent recognizes a natural, logical break point in the work stream and explicitly recommends sunsetting.

The Fix

Refine the trigger conditions for the session-sunset skill.

  • Update AGENTS.md §21 to reflect these explicit boundaries rather than generic "handovers".
  • Update .agent/skills/session-sunset/references/session-sunset-workflow.md to define the three explicit boundary rules.
  • Clarify the distinction between a "Turn" (prompt resolution) and a "Session" (continuous working block).

Acceptance Criteria

  • AGENTS.md §21 session-sunset trigger is updated to specify context exhaustion, semantic pivots, or explicit recommendations.
  • .agent/skills/session-sunset/references/session-sunset-workflow.md is updated with definitions for "Turn" vs "Session" and explicitly lists the new sunset conditions.

Out of Scope

  • Building automated token-counting tools or MCP integrations for exact context window measurement. Agents must rely on intuition and provider-level limits for now.

Avoided Traps

  • Equating 1 Prompt = 1 Session: Assuming every prompt resolution requires a handover protocol wastes compute and fractures memory continuity.

Origin Session ID: 09444f9b-9ae1-4d9a-81a4-02e885870417 Retrieval Hint: "Agentic Time Perception" vs "Human Time Perception"

tobiu referenced in commit 99f09fe - "feat(ai): Refine session sunset trigger definitions (#10374) (#10375) on Apr 26, 2026, 4:44 PM
tobiu closed this issue on Apr 26, 2026, 4:44 PM