Context
The SessionMemoryObserverActor was added in #410 as a spike. It works — it watches the conversation stream and distills memories when the session goes idle. But it needs formalization as a first-class framework component, particularly now that #411 introduced the Passivating state with the plumbing for passivation-triggered distillation.
What needs to happen
Passivation-triggered distillation
The observer currently only distills on its own idle timer (90s). When the parent session enters Passivating, it sends DistillMemories to the observer (added in #411). The observer already handles this message, but the interaction protocol needs formal specification:
Protocol formalization
Own OpenSpec
The observer has its own persistence identity (memory-observer-{sessionId}), its own protocol, and its own lifecycle. It deserves its own OpenSpec spec rather than being a subsection of netclaw-session.
Prerequisite work (done)
Refs
Context
The
SessionMemoryObserverActorwas added in #410 as a spike. It works — it watches the conversation stream and distills memories when the session goes idle. But it needs formalization as a first-class framework component, particularly now that #411 introduced thePassivatingstate with the plumbing for passivation-triggered distillation.What needs to happen
Passivation-triggered distillation
The observer currently only distills on its own idle timer (90s). When the parent session enters
Passivating, it sendsDistillMemoriesto the observer (added in #411). The observer already handles this message, but the interaction protocol needs formal specification:DistillMemories→ triggers immediate distillation regardless of idle stateSessionDistillationCompletedback to parent with proposalsProtocol formalization
SessionPhaseChanged(Passivating)notification (already sent byTransitionTo()in refactor: formalize LlmSessionActor state machine for composable lifecycle states #411)DistillMemoriesrequest →SessionDistillationCompletedresponseOwn OpenSpec
The observer has its own persistence identity (
memory-observer-{sessionId}), its own protocol, and its own lifecycle. It deserves its own OpenSpec spec rather than being a subsection ofnetclaw-session.Prerequisite work (done)
SessionPhase.Passivatingstate (refactor: formalize LlmSessionActor state machine for composable lifecycle states #411)TransitionTo()sendsSessionPhaseChangedto observer (refactor: formalize LlmSessionActor state machine for composable lifecycle states #411)Passivatingbehavior sendsDistillMemoriesand waits forSessionDistillationCompleted(refactor: formalize LlmSessionActor state machine for composable lifecycle states #411)DistillMemories(feat(memory): session-level memory observer actor (spike) #410)Refs