{"record":{"id":"0e0ae0d340fcde51","repo":"mastra-ai/mastra","slug":"observational-memory-processor-not-available","errorCode":null,"errorMessage":"Observational Memory processor not available","messagePattern":"Observational Memory processor not available","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"packages/server/src/server/handlers/memory.ts","lineNumber":787,"sourceCode":"            if (!record || (!record.isBufferingObservation && !record.isBufferingReflection)) {\n              break;\n            }\n            await new Promise(resolve => setTimeout(resolve, pollIntervalMs));\n          }\n          return { record };\n        }\n        return { record: null };\n      }\n\n      const omConfig = await getOMConfigFromAgent(agent, requestContext);\n      if (!omConfig?.enabled) {\n        throw new HTTPException(400, { message: 'Observational Memory is not enabled for this agent' });\n      }\n\n      // Resolve the OM processor to call waitForBuffering\n      const omProcessor = await agent.resolveProcessorById('observational-memory', requestContext);\n      if (!omProcessor || typeof (omProcessor as any).waitForBuffering !== 'function') {\n        throw new HTTPException(400, { message: 'Observational Memory processor not available' });\n      }\n\n      // Block until buffering completes (30s timeout)\n      await (omProcessor as any).waitForBuffering(threadId, resourceId);\n\n      // After buffering, fetch the updated record\n      const memory = await getMemoryFromContext({ mastra, agentId, requestContext });\n      if (!memory) {\n        throw new HTTPException(400, { message: 'Memory is not configured for this agent' });\n      }\n\n      let memoryStore: MemoryStorage | undefined;\n      try {\n        memoryStore = await memory.storage.getStore('memory');\n      } catch {\n        throw new HTTPException(400, { message: 'Memory storage is not initialized' });\n      }\n      if (!memoryStore) {","sourceCodeStart":769,"sourceCodeEnd":805,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/memory.ts#L769-L805","documentation":"OM is enabled, but agent.resolveProcessorById('observational-memory') returned nothing, or the resolved processor lacks a waitForBuffering method. The handler needs this processor to block until in-flight OM buffering finishes; without it the route cannot proceed.","triggerScenarios":"Agent configured with OM enabled but the observational-memory processor was not registered on the agent (config shape changed between versions), a custom processor list replaced it, or the installed @mastra/core version's processor interface no longer exposes waitForBuffering.","commonSituations":"Version drift: server and core packages upgraded independently so the processor id or API changed; agents built via stored/builder configs that persist an OM flag but not the processor; custom processors array omitting the built-in OM processor.","solutions":["Upgrade @mastra/core, @mastra/server and memory packages to aligned versions so the built-in observational-memory processor registers automatically.","Ensure the OM processor is included in the agent's processor list when configuring processors manually.","Verify the resolved processor implements waitForBuffering; if using a custom OM implementation, add that method.","Catch the 400 client-side and fall back to fetching the record directly via GET observational-memory."],"exampleFix":"// before\nnew Agent({ name: 'a', instructions: '...', memory, processors: [myCustomProcessor] });\n// after\nnew Agent({ name: 'a', instructions: '...', memory, processors: [myCustomProcessor, new ObservationalMemoryProcessor({ scope: 'resource' })] });","handlingStrategy":"fallback","validationCode":"// server-side sanity: confirm the processor resolves before exposing the route to clients\nconst proc = await agent.resolveProcessorById('observational-memory', requestContext);\nif (typeof (proc as any)?.waitForBuffering !== 'function') {\n  console.warn('OM processor missing waitForBuffering; check package versions');\n}","typeGuard":"function hasWaitForBuffering(p: unknown): p is { waitForBuffering(threadId?: string, resourceId?: string): Promise<void> } {\n  return !!p && typeof (p as any).waitForBuffering === 'function';\n}","tryCatchPattern":"try {\n  return await waitForBuffering(agentId, threadId, resourceId);\n} catch (e) {\n  if (isHttpError(e, 400) && /processor not available/.test(e.message)) {\n    // degrade: fetch current record directly instead of waiting\n    return fetchObservationalMemory(agentId, resourceId, threadId);\n  }\n  throw e;\n}","preventionTips":["Upgrade @mastra/core, @mastra/server and memory packages together","Don't override the agents' processor list without including the OM processor","Smoke-test OM agents after version bumps","Verify stored/builder agent configs carry the processor, not just the flag"],"tags":["configuration","processors","observational-memory","version-mismatch"],"backgroundTag":"missing-processor","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}