{"record":{"id":"dbfed385d0122dbc","repo":"mastra-ai/mastra","slug":"workingmemory-usestatesignals-is-not-supported-wit","errorCode":null,"errorMessage":"workingMemory.useStateSignals is not supported with workingMemory.version: 'vnext'. Use stable template working memory or disable useStateSignals.","messagePattern":"workingMemory\\.useStateSignals is not supported with workingMemory\\.version: 'vnext'\\. Use stable template working memory or disable useStateSignals\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/memory/src/index.ts","lineNumber":2175,"sourceCode":"Notes:\n- This system is here so that you can maintain the conversation when your context window is very short\n- The user will not see the working memory data directly`;\n  }\n\n  private isVNextWorkingMemoryConfig(config?: MemoryConfig): boolean {\n    if (!config?.workingMemory) return false;\n\n    const isMDWorkingMemory =\n      !(`schema` in config.workingMemory) &&\n      (typeof config.workingMemory.template === `string` || config.workingMemory.template) &&\n      config.workingMemory;\n\n    return Boolean(isMDWorkingMemory && isMDWorkingMemory.version === `vnext`);\n  }\n\n  private assertWorkingMemoryStateSignalsCompatibility(config?: MemoryConfigInternal): void {\n    if (config?.workingMemory?.useStateSignals === true && this.isVNextWorkingMemoryConfig(config)) {\n      throw new Error(\n        \"workingMemory.useStateSignals is not supported with workingMemory.version: 'vnext'. Use stable template working memory or disable useStateSignals.\",\n      );\n    }\n  }\n\n  private getObservationEmbeddingIndexName(dimensions?: number): string {\n    const defaultDimensions = 384;\n    const usedDimensions = dimensions ?? defaultDimensions;\n    const separator = this.vector?.indexSeparator ?? '_';\n    return `${this.observationIndexPrefix}${separator}${usedDimensions}`;\n  }\n\n  private async createObservationEmbeddingIndex(dimensions?: number): Promise<{ indexName: string }> {\n    const defaultDimensions = 384;\n    const usedDimensions = dimensions ?? defaultDimensions;\n    const indexName = this.getObservationEmbeddingIndexName(dimensions);\n\n    if (typeof this.vector === `undefined`) {","sourceCodeStart":2157,"sourceCodeEnd":2193,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/memory/src/index.ts#L2157-L2193","documentation":"The vnext working memory format (markdown working memory version: 'vnext') does not implement useStateSignals, the signal-based state exposure used by the stable template working memory. Memory validates the config combination up front and throws rather than behaving inconsistently at runtime.","triggerScenarios":"Configuring workingMemory: { version: 'vnext', useStateSignals: true } (or a config merge that sets useStateSignals true while version is vnext) on a Memory instance.","commonSituations":"Migrating to vnext markdown working memory while keeping useStateSignals from a previous config; framework/agent defaults injecting useStateSignals: true; copy-pasting configs between vnext and stable setups.","solutions":["Remove useStateSignals: true (or set it false) from the vnext workingMemory config.","If you need useStateSignals, use stable (template) working memory by dropping version: 'vnext'.","Check config-merging code (agent defaults, presets) that might set useStateSignals after your vnext config."],"exampleFix":"// before\nworkingMemory: { enabled: true, version: 'vnext', useStateSignals: true }\n// after (option A)\nworkingMemory: { enabled: true, version: 'vnext' }\n// after (option B — keep signals)\nworkingMemory: { enabled: true, useStateSignals: true }","handlingStrategy":"validation","validationCode":"const wm = config.workingMemory;\nif (wm?.useStateSignals === true && wm.version === 'vnext') {\n  throw new Error(\"useStateSignals is incompatible with workingMemory.version 'vnext'\");\n}","typeGuard":"function isVNextWithSignals(wm?: { version?: 'vnext' | string; useStateSignals?: boolean }): boolean {\n  return wm?.version === 'vnext' && wm.useStateSignals === true;\n}","tryCatchPattern":"try {\n  const memory = new Memory({ storage, options: { workingMemory: wmConfig } });\n} catch (e) {\n  if (e instanceof Error && e.message.includes('useStateSignals')) {\n    wmConfig = { ...wmConfig, useStateSignals: undefined };\n  }\n  throw e;\n}","preventionTips":["Decide between vnext markdown working memory and signal-based state; do not mix.","Audit config merge/defaults code that injects useStateSignals: true.","Add a config unit test asserting the two options never combine."],"tags":["memory","working-memory","configuration","incompatible-options"],"backgroundTag":"incompatible-config-options","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}