mastra-ai/mastra · error

Subconscious remind requires a configured knowledge storage

Error message

Subconscious remind requires a configured knowledge storage domain.

What it means

The remind processor's execution path (packages/memory/src/processors/observational-memory/subconscious/remind.ts:121) fetches the knowledge storage domain via `context.memory.storage.getStore('knowledge')`. If the configured storage backend has no knowledge domain registered, remind cannot read or drop reminder records and throws.

Source

Thrown at packages/memory/src/processors/observational-memory/subconscious/remind.ts:121

}

export class SubconsciousRemindExtractor extends Extractor<string> {
  constructor(config: ResolvedSubconsciousAgent, omModel?: ObservationalMemoryModel) {
    super({
      name: 'Remind',
      mode: 'hook',
      metadataKeyPath: false,
      onExtracted: async context => {
        if (!context.rawObservations?.trim() || !context.memory || !context.sendSignal) {
          return;
        }

        let scope: KnowledgeScope | undefined;
        let store: KnowledgeStorage | undefined;
        try {
          scope = resolveScope(context);
          store = await context.memory.storage.getStore('knowledge');
          if (!store) throw new Error('Subconscious remind requires a configured knowledge storage domain.');
          const sources = await dropFreshOwnRecords(
            store,
            await findReminderSources(store, scope, context.rawObservations),
            context.threadId,
          );
          if (sources.length === 0) return;
          const model = await resolveSubconsciousAgentModel({
            config,
            omModel,
            mainAgent: context.mainAgent,
            requestContext: context.requestContext,
          });
          if (!model) return;
          const agent = new Agent({
            id: `subconscious-remind-${context.threadId}`,
            name: 'Subconscious Remind',
            instructions: [DEFAULT_INSTRUCTIONS, config.instructions?.trim()].filter(Boolean).join('\n\n'),
            model,

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Use a storage adapter that supports the knowledge domain and configure it on the Memory instance.
  2. Run the storage schema migration/install step so the knowledge store exists.
  3. Verify with `memory.storage.getStore('knowledge')` in a script before enabling the remind processor.

Example fix

// before
new Memory({ storage: new LegacyInMemoryStorage() });
// after
new Memory({ storage: new MastraStorage({ domains: { knowledge: KnowledgeStorageDomain } }) });
Defensive patterns

Strategy: validation

Validate before calling

const store = await memory.storage.getStore('knowledge');
if (!store) throw new Error('Knowledge storage domain is not configured; enable it before using observational memory remind');

Type guard

function hasKnowledgeDomain(storage) {
  return typeof storage?.getStore === 'function' && Boolean(storage.getStore('knowledge'));
}

Try / catch

try {
  await remind(context);
} catch (e) {
  if (e.message.includes('knowledge storage domain')) {
    // fall back: disable remind for this instance or reconfigure storage
    logger.warn('remind disabled: no knowledge storage domain');
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: Running the observational-memory processor with a storage adapter that does not implement/enable the `'knowledge'` store, or `getStore('knowledge')` returning undefined because the knowledge domain was never created/migrated in the database.

Common situations: Upgrading Mastra while keeping an older storage config that predates the knowledge domain; using a minimal/legacy storage class lacking knowledge support; pointing at an existing database whose schema was never migrated to include knowledge tables.

Related errors


AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30). Data as JSON: /api/errors/663945722eb44688. Report an issue: GitHub.