{"record":{"id":"3c4cd615ccc1f59a","repo":"mastra-ai/mastra","slug":"subconscious-capture-shares-the-observer-model-and","errorCode":null,"errorMessage":"Subconscious capture shares the Observer model and does not accept model or maxSteps.","messagePattern":"Subconscious capture 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":201,"sourceCode":"            includePreviousExtraction: false,\n            onExtracted: custom.onExtracted,\n          }),\n        );\n      }\n    }\n    return extractors;\n  }\n\n  #validateObservationEntry(entry: SubconsciousObservationEntry): void {\n    const name = entryName(entry);\n    if (typeof entry === 'string') {\n      if (!BUILT_IN_OBSERVATION.has(name)) throw new Error(`Unknown Subconscious observation agent: ${name}`);\n      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.`);","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/memory/src/processors/observational-memory/subconscious/index.ts#L183-L219","documentation":"The built-in 'capture' observation agent deliberately reuses the Observer's model and step budget; allowing per-entry overrides would contradict that design. If a capture entry object contains a 'model' or 'maxSteps' key, the constructor rejects it during #validateObservationEntry.","triggerScenarios":"new Subconscious({ observation: [{ name: 'capture', model: someModel }] }) or { name: 'capture', maxSteps: 5 }. Any capture entry object containing those keys.","commonSituations":"Copy-pasting a custom-extractor config onto the capture entry; assuming capture can run on a cheaper model; migrating config from a custom extractor entry to capture while keeping model/maxSteps fields.","solutions":["Remove the model and maxSteps keys from the capture entry.","Configure the model/maxSteps on the Observer (the shared configuration) instead.","If a different model is truly needed, create a custom observation extractor object with schema + onExtracted instead of using built-in capture."],"exampleFix":"// before\nnew Subconscious({ observation: [{ name: 'capture', model: 'gpt-4o', maxSteps: 3 }] });\n// after\nnew Subconscious({ observer: { model: 'gpt-4o' }, observation: [{ name: 'capture' }] });","handlingStrategy":"validation","validationCode":"const capture = { name: 'capture', model: m };\nif ('model' in capture || 'maxSteps' in capture) {\n  throw new Error('capture inherits the Observer model; move model/maxSteps to observer config');\n}","typeGuard":"function isPlainCaptureEntry(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('capture shares the Observer model')) {\n    entry = { name: 'capture' };\n    sub = new Subconscious({ observation: [entry] });\n  } else throw e;\n}","preventionTips":["Type capture entries narrowly so extra keys are excess-property errors at compile time.","Configure model/maxSteps only on the Observer.","Comment shared configs that get copied between entries."],"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"}