Merged
Size
M
Change Breakdown
Bug Fix60%
Maintenance25%
Testing15%
#63929fix(memory-core): reconcile managed dreaming cron across runtime lifecycle

Dreaming cron now survives runtime service changes

Scheduled memory management jobs will no longer silently fail when the cron service is swapped or reloaded during runtime. The system now monitors and recovers missing jobs automatically.

The scheduled job that manages memory "dreaming" — a background process that promotes short-term memories — would silently break whenever the cron service was swapped or reloaded during normal operation. Because cron reconciliation only happened once at startup, any runtime changes to the service, plugins, or configuration would leave the job stale or missing without warning.

A new reconciliation function now handles both startup and runtime paths. Instead of reconciling once and forgetting, the system re-checks the cron service state whenever configuration or plugins change. Missing jobs are recovered, and updates to schedules or timezones are applied automatically. A 60-second throttle prevents excessive reconciliation runs.

This fix lives in the memory-core extension and ensures that memory management continues reliably regardless of runtime service changes.

View Original GitHub Description

Summary

  • reconcile the managed dreaming cron across startup and runtime lifecycle paths instead of only at gateway startup
  • keep the reconciler bound to current startup context/deps so cron service swaps and reloads do not leave the dreaming job stale or missing
  • add focused lifecycle regressions for startup enablement, cadence/timezone updates, and warning dedupe

Testing

  • pnpm test -- extensions/memory-core/src/dreaming.test.ts on mb-server

AI-assisted.

© 2026 · via Gitpulse