{"record":{"id":"ebc347f2cec4960d","repo":"mastra-ai/mastra","slug":"subconscious-observation-extractor-name-share","errorCode":null,"errorMessage":"Subconscious observation extractor \"${name}\" shares the Observer model and does not accept model or maxSteps.","messagePattern":"Subconscious observation extractor \"(.+?)\" shares the Observer model and does not accept model or maxSteps\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/memory/src/processors/observational-memory/subconscious/index.ts","lineNumber":214,"sourceCode":"      return;\n    }\n    if (BUILT_IN_OBSERVATION.has(name)) {\n      if (name === 'capture') {\n        if ('model' in entry || 'maxSteps' in entry) {\n          throw new Error('Subconscious capture shares the Observer model and does not accept model or maxSteps.');\n        }\n        if (\n          'schema' in entry &&\n          entry.schema &&\n          (!('onExtracted' in entry) || typeof entry.onExtracted !== 'function')\n        ) {\n          throw new Error('A custom capture schema requires an onExtracted hook that handles its output.');\n        }\n      }\n      return;\n    }\n    if ('model' in entry || 'maxSteps' in entry) {\n      throw new Error(\n        `Subconscious observation extractor \"${name}\" shares the Observer model and does not accept model or maxSteps.`,\n      );\n    }\n    if (!('schema' in entry) || !entry.schema || !('onExtracted' in entry) || typeof entry.onExtracted !== 'function') {\n      throw new Error(`Custom Subconscious observation agent \"${name}\" requires schema and onExtracted.`);\n    }\n  }\n\n  #validateReflectionEntry(entry: SubconsciousReflectionEntry): void {\n    const name = entryName(entry);\n    if (typeof entry === 'string') {\n      if (!BUILT_IN_REFLECTION.has(name)) throw new Error(`Unknown Subconscious reflection agent: ${name}`);\n      return;\n    }\n    if (BUILT_IN_REFLECTION.has(name) && 'agent' in entry && entry.agent) {\n      throw new Error(`Built-in Subconscious reflection agent \"${name}\" cannot be replaced with a custom agent.`);\n    }\n    if (!BUILT_IN_REFLECTION.has(name) && !entry.instructions?.trim() && !('agent' in entry && entry.agent)) {","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/memory/src/processors/observational-memory/subconscious/index.ts#L196-L232","documentation":"Custom (non-built-in) observation extractor entries share the Observer's model by design, so specifying model or maxSteps on them is rejected. This keeps all observation extraction on one model and prevents silent per-extractor model drift.","triggerScenarios":"new Subconscious({ observation: [{ name: 'my-extractor', model: m, schema: S, onExtracted: f }] }) — any custom entry containing 'model' or 'maxSteps' keys.","commonSituations":"Copy-pasting agent config into an extractor entry; assuming each extractor can use its own model; migrating from an older API that allowed per-extractor models.","solutions":["Remove model and maxSteps from the custom extractor entry.","Set the desired model once on the Observer configuration.","If separate models are essential, run multiple Subconscious processors or a custom pipeline outside this option."],"exampleFix":"// before\n{ name: 'facts', model: 'gpt-4o-mini', schema: FactsSchema, onExtracted: save }\n// after\n{ name: 'facts', schema: FactsSchema, onExtracted: save } // model comes from the Observer","handlingStrategy":"validation","validationCode":"const custom = { name: 'facts', model: m, schema: S, onExtracted: f };\nif ('model' in custom || 'maxSteps' in custom) throw new Error('custom extractors share the Observer model');","typeGuard":"function isCustomExtractorEntry(e: object): boolean {\n  return !('model' in e) && !('maxSteps' in e);\n}","tryCatchPattern":"try {\n  sub = new Subconscious({ observation: [entry] });\n} catch (e) {\n  if (e instanceof Error && e.message.includes('shares the Observer model')) {\n    const { model: _m, maxSteps: _s, ...rest } = entry as Record<string, unknown>;\n    sub = new Subconscious({ observation: [rest] });\n  } else throw e;\n}","preventionTips":["Centralize model selection in the Observer config only.","Strip model/maxSteps keys when transforming legacy configs.","Use satisfies/strong typing to flag disallowed keys."],"tags":["configuration","validation","observational-memory"],"backgroundTag":"invalid-configuration-value","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}