{"record":{"id":"29ae418c79828aa5","repo":"mastra-ai/mastra","slug":"sendnotificationsignal-requires-a-notifications-st","errorCode":null,"errorMessage":"sendNotificationSignal requires a notifications storage domain","messagePattern":"sendNotificationSignal requires a notifications storage domain","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/agent/agent.ts","lineNumber":8315,"sourceCode":"    target: SendAgentNotificationSignalOptions<OUTPUT>,\n  ): Promise<SendAgentNotificationSignalResult<OUTPUT>[]>;\n  async sendNotificationSignal<OUTPUT = TOutput>(\n    notification: SendNotificationSignalInput | SendNotificationSignalInput[],\n    target: SendAgentNotificationSignalOptions<OUTPUT>,\n  ): Promise<SendAgentNotificationSignalResult<OUTPUT> | SendAgentNotificationSignalResult<OUTPUT>[]> {\n    const isBatch = Array.isArray(notification);\n    const inputs = isBatch ? notification : [notification];\n    const results = await this.#sendNotificationSignalBatch<OUTPUT>(inputs, target);\n    return isBatch ? results : results[0]!;\n  }\n\n  async #sendNotificationSignalBatch<OUTPUT = TOutput>(\n    inputs: SendNotificationSignalInput[],\n    target: SendAgentNotificationSignalOptions<OUTPUT>,\n  ): Promise<SendAgentNotificationSignalResult<OUTPUT>[]> {\n    const notifications = await this.#mastra?.getStorage()?.getStore('notifications');\n    if (!notifications) {\n      throw new Error('sendNotificationSignal requires a notifications storage domain');\n    }\n\n    const records = [];\n    for (const notification of inputs) {\n      records.push(\n        await notifications.createNotification({\n          ...notification,\n          agentId: this.id,\n          resourceId: target.resourceId,\n          threadId: target.threadId,\n        }),\n      );\n    }\n\n    const threadState = agentThreadStreamRuntime.getThreadState(\n      { resourceId: target.resourceId, threadId: target.threadId },\n      this.getPubSub(),\n    );","sourceCodeStart":8297,"sourceCodeEnd":8333,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/agent/agent.ts#L8297-L8333","documentation":"Agent notification signals are persisted through the notifications storage domain. #sendNotificationSignalBatch checks getStore('notifications') and throws a plain Error when it is unavailable — i.e. the Mastra instance either has no storage or its backend doesn't implement the notifications domain.","triggerScenarios":"Calling agent.sendNotificationSignal() (or the batch path) on a Mastra instance without storage, or with a storage adapter that lacks a notifications store implementation.","commonSituations":"Ephemeral/in-memory Mastra setups; older storage adapters that predate the notifications domain; forgetting to configure storage in the deployment environment while it existed locally.","solutions":["Attach a storage backend that implements the notifications domain to the Mastra instance.","Upgrade @mastra/storage adapters to versions that support the notifications store.","Guard the call: check agent storage availability before sending notification signals, or handle the thrown Error."],"exampleFix":"// before\nconst mastra = new Mastra({ agents: { myAgent } });\nawait myAgent.sendNotificationSignal(input, target);\n// after\nconst mastra = new Mastra({ agents: { myAgent }, storage: new PostgresStore({ connectionString: process.env.DATABASE_URL }) });\nawait myAgent.sendNotificationSignal(input, target);","handlingStrategy":"validation","validationCode":"const notifications = await mastra.getStorage()?.getStore('notifications');\nif (!notifications) {\n  logger.warn('Notifications storage unavailable; skipping notification signal');\n  return [];\n}","typeGuard":null,"tryCatchPattern":"try {\n  await agent.sendNotificationSignal(input, target);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('notifications storage domain')) {\n    logger.warn('Notification storage not configured; skipping');\n    return;\n  }\n  throw e;\n}","preventionTips":["Configure a storage backend implementing the notifications domain.","Keep storage adapters up to date with the notifications store API.","Feature-flag notification signals behind a storage availability check."],"tags":["agent","storage","notifications","configuration"],"backgroundTag":"missing-storage-configuration","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}