---
number: 9934
title: >-
  fix: Remove early abort in Sandman pipeline to permit ambient GC and
  GoldenPath (#9933)
author: tobiu
state: MERGED
createdAt: '2026-04-12T17:09:28Z'
updatedAt: '2026-04-12T17:11:30Z'
closedAt: '2026-04-12T17:11:26Z'
mergedAt: '2026-04-12T17:11:26Z'
head: agent/9933-sandman-early-abort-fix
base: dev
url: 'https://github.com/neomjs/neo/pull/9934'
---
Resolves #9933. Modified `processUndigestedSessions()` to no longer abort execution when zero undigested sessions are present, allowing the daemon to ambiently perform Garbage Collection and synthesize the Golden Path roadmap consistently.

## Comments

### `@tobiu` commented on 2026-04-12T17:10:39Z

**Input from Antigravity (Gemini 3.1 Pro):**

> ✦ # PR Review Summary
> 
> **Status:** Approved
> 
> Thanks for stepping in so quickly! Excellent tactical fix to restore the ambient reliability of the background Sandman daemon. It is absolutely critical that global topological decay and garbage collection are decoupled from the frequency of new session ingestion.
> 
> ---
> 
> ### 📊 Evaluation Metrics
> *   **`[ARCH_ALIGNMENT]`**: 100 - Resolves an architectural bottleneck where ambient system maintenance (Garbage Collection and Strategy Extraction) was improperly halted by a lack of new episodic memory.
> *   **`[CONTENT_COMPLETENESS]`**: 90 - "Fat Ticket" protocol was observed, properly summarizing the two distinct workflows of the Sandman pipeline vs Memory ingestion.
> *   **`[EXECUTION_QUALITY]`**: 100 - Clean, precise refactoring. Replaced the terminating short-circuit with a solid bifurcating `if/else` control flow structure. Native test suites verified stability seamlessly.
> *   **`[PRODUCTIVITY]`**: 100 - Instantly restores the expected automated execution flow for the scheduled `npm run ai:run-sandman` process.
> *   **`[IMPACT]`**: 60 - Essential bug fix to ensure consistent Native Graph telemetry and Golden Path vector realignment.
> *   **`[COMPLEXITY]`**: 10 - Standard logic control-flow extraction.
> *   **`[EFFORT_PROFILE]`**: Quick Win - High ROI execution to restore vital background agent logic.
> 
> ---
> 
> ### 🕸️ Context & Graph Linking
> *   **Target Epic / Issue ID:** Resolves #9933
> *   **Related Graph Nodes:** `agent/9933-sandman-early-abort-fix`, `CLASS:Neo.ai.mcp.server.memory-core.services.DreamService`
> 
> ---
> 
> ### 🧠 Graph Ingestion Notes
> 
> *   **`[RETROSPECTIVE]`**: Background autonomous daemons should structurally decouple "input-driven" processing (e.g. digesting new sessions) from "ambient-maintenance" processing (e.g. garbage collection, decay, roadmap synthesis). Short-circuits based on the absence of inputs should never cascade to halt ambient maintenance cycles.
> 
> ---
> 
> ### 📋 Required Actions
> 
> To proceed with merging, please address the following:
> 
> - [x] Merge PR. No further changes requested.
> 
> Clean and verified. Approved for Squash Merge.

---

