{"record":{"id":"d0a62cc72099ac37","repo":"mastra-ai/mastra","slug":"observational-memory-requires-mastra-core-support-d0a62c","errorCode":null,"errorMessage":"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version.","messagePattern":"Observational memory requires @mastra/core support for request-response-id-rotation\\. Please bump @mastra/core to a newer version\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/memory/src/processors/observational-memory/observational-memory.ts","lineNumber":463,"sourceCode":"      releaseLock = resolve;\n    });\n    this.locks.set(key, lockPromise);\n\n    try {\n      return await fn();\n    } finally {\n      // Release the lock\n      releaseLock!();\n      // Clean up if this is still our lock\n      if (this.locks.get(key) === lockPromise) {\n        this.locks.delete(key);\n      }\n    }\n  }\n\n  constructor(config: ObservationalMemoryConfig) {\n    if (!coreFeatures.has('request-response-id-rotation')) {\n      throw new Error(\n        'Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version.',\n      );\n    }\n\n    // Validate that top-level model is not used together with sub-config models\n    if (config.model && config.observation?.model) {\n      throw new Error(\n        'Cannot set both `model` and `observation.model`. Use `model` to set both agents, or set each individually.',\n      );\n    }\n    if (config.model && config.reflection?.model) {\n      throw new Error(\n        'Cannot set both `model` and `reflection.model`. Use `model` to set both agents, or set each individually.',\n      );\n    }\n\n    this.shouldObscureThreadIds = config.obscureThreadIds || false;\n    this.storage = config.storage;","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/memory/src/processors/observational-memory/observational-memory.ts#L445-L481","documentation":"ObservationalMemory depends on a runtime capability of @mastra/core ('request-response-id-rotation') that older core versions lack. The constructor checks coreFeatures and throws at instantiation so incompatibility is caught immediately rather than at runtime mid-conversation.","triggerScenarios":"Constructing new ObservationalMemory(...) while the installed @mastra/core predates the request-response-id-rotation feature (mismatched package versions).","commonSituations":"Partial dependency upgrade (bumped @mastra/memory but not @mastra/core); lockfile pinning an old core; monorepo where one package resolves a stale core copy.","solutions":["Upgrade @mastra/core to the latest version: pnpm update @mastra/core (or the minimum version supporting this feature)","Ensure @mastra/memory and @mastra/core versions are upgraded together in package.json and lockfile","Verify only one @mastra/core copy is installed (check for duplicate versions in the lockfile / dedupe)"],"exampleFix":"// before (package.json)\n\"@mastra/core\": \"^0.10.0\",\n\"@mastra/memory\": \"^0.11.0\"\n// after\n\"@mastra/core\": \"^0.11.0\",\n\"@mastra/memory\": \"^0.11.0\"\n// then: pnpm install","handlingStrategy":"validation","validationCode":"import { coreFeatures } from '@mastra/core';\nif (!coreFeatures.has('request-response-id-rotation')) {\n  throw new Error('Upgrade @mastra/core before using ObservationalMemory');\n}\nconst mem = new ObservationalMemory(config);","typeGuard":"function coreSupportsRotation(features: Set<string>): boolean {\n  return features.has('request-response-id-rotation');\n}","tryCatchPattern":"try {\n  const mem = new ObservationalMemory(config);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('request-response-id-rotation')) {\n    console.error('Run: pnpm update @mastra/core @mastra/memory');\n    process.exit(1);\n  } else throw err;\n}","preventionTips":["Keep @mastra/core and @mastra/memory on the same release line; upgrade together","Check for duplicate @mastra/core versions in the lockfile (dedupe if needed)","Pin minimum versions in package.json rather than relying on transitive resolution","Gate ObservationalMemory usage behind a startup capability check in environments with frozen deps"],"tags":["version-compatibility","dependency","installation"],"backgroundTag":"incompatible-dependency-version","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}