Context
Sub-issue of #10671. Today checkSunsetted.mjs:124-127 emits sunsetted: boolean only on missing WAKE_SUBSCRIPTION (per #10641 fix). The two-mode recovery design needs a richer detector that distinguishes:
- sunset = no active subscription (terminal — needs full harness restart)
- idle_out_candidate = active subscription + stale memory (recoverable via in-place A2A nudge)
The Problem
Current binary signal forces resumeHarness into one path (Cmd+N spawn). Two-mode design needs the detector to disambiguate so the right recovery primitive fires.
The Architectural Reality
checkSunsetted.mjs:36-44 queries WAKE_SUBSCRIPTION; lines 90-99 query last AGENT_MEMORY for staleness. Both signals are available; today only the WAKE_SUBSCRIPTION presence is consumed downstream.
Critical discipline preserved from #10641: staleness is NOT an authoritative sunset signal. Reintroduction here is as a separate, lower-authority idle_out_candidate signal. MUST NOT regress to staleness=sunset.
The Fix
Detector emits structured payload:
{
"identity": "@neo-opus-4-7",
"sunset": true|false,
"idle_out_candidate": true|false,
"evidence": {
"subscription_active": true|false,
"subscription_status": "active|degraded|disabled|missing",
"last_memory_age_min": N,
"last_sessionId": "..."
},
"recommended_action": "sunset_restart" | "idle_out_nudge" | "no_action"
}
resumeHarness.mjs consumes recommended_action to fork into the right path.
Acceptance Criteria
Out of Scope
resumeHarness consumption logic — covered by sibling sub-issue (sunset-mode restart substrate)
- In-flight lock state in detector output — covered by separate lock-primitive sub-issue
Related
- Parent: #10671
- Builds on: #10641 (staleness false-positive lesson preserved)
Origin Session ID: cce1fea5-32ff-410c-b820-2e9a27b3cd51
Context
Sub-issue of #10671. Today
checkSunsetted.mjs:124-127emitssunsetted: booleanonly on missingWAKE_SUBSCRIPTION(per #10641 fix). The two-mode recovery design needs a richer detector that distinguishes:The Problem
Current binary signal forces
resumeHarnessinto one path (Cmd+N spawn). Two-mode design needs the detector to disambiguate so the right recovery primitive fires.The Architectural Reality
checkSunsetted.mjs:36-44queriesWAKE_SUBSCRIPTION; lines 90-99 query lastAGENT_MEMORYfor staleness. Both signals are available; today only theWAKE_SUBSCRIPTIONpresence is consumed downstream.Critical discipline preserved from #10641: staleness is NOT an authoritative sunset signal. Reintroduction here is as a separate, lower-authority
idle_out_candidatesignal. MUST NOT regress tostaleness=sunset.The Fix
Detector emits structured payload:
{ "identity": "@neo-opus-4-7", "sunset": true|false, "idle_out_candidate": true|false, "evidence": { "subscription_active": true|false, "subscription_status": "active|degraded|disabled|missing", "last_memory_age_min": N, "last_sessionId": "..." }, "recommended_action": "sunset_restart" | "idle_out_nudge" | "no_action" }resumeHarness.mjsconsumesrecommended_actionto fork into the right path.Acceptance Criteria
sunsetsignal preserves #10641's discipline: only fires on missing/disabledWAKE_SUBSCRIPTION, never on staleness aloneidle_out_candidatesignal fires only whensubscription_active: trueANDlast_memory_age_min> thresholdsunset,idle_out_candidate)sunsetted: boolean) emitted alongside new structured payload until callers migrateOut of Scope
resumeHarnessconsumption logic — covered by sibling sub-issue (sunset-mode restart substrate)Related
Origin Session ID: cce1fea5-32ff-410c-b820-2e9a27b3cd51