{"record":{"id":"4401758e595176eb","repo":"mastra-ai/mastra","slug":"acpagent-does-not-support-resuming-suspended-strea","errorCode":null,"errorMessage":"AcpAgent does not support resuming suspended stream calls","messagePattern":"AcpAgent does not support resuming suspended stream calls","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agent-sdks/acp/src/agent.ts","lineNumber":123,"sourceCode":"    const messageList = this.createMessageList(messages, text);\n\n    return {\n      text,\n      response: {\n        dbMessages: messageList.get.response.db(),\n      },\n      toolResults: [],\n      finishReason: 'stop',\n      runId: options?.runId ?? randomUUID(),\n    };\n  }\n\n  async resumeGenerate(): Promise<SubAgentGenerateResult> {\n    throw new Error('AcpAgent does not support resuming suspended generate calls');\n  }\n\n  async resumeStream(): Promise<SubAgentStreamResult> {\n    throw new Error('AcpAgent does not support resuming suspended stream calls');\n  }\n\n  async stream(messages: MessageListInput, options?: AgentStreamOptions): Promise<SubAgentStreamResult> {\n    const runId = options?.runId ?? randomUUID();\n    const prompt = this.getPrompt(messages, options?.instructions);\n    const signal = (options as { abortSignal?: AbortSignal } | undefined)?.abortSignal;\n    const messageList = new MessageList();\n    messageList.add(messages, 'input');\n\n    let resolveText!: (text: string) => void;\n    let rejectText!: (error: unknown) => void;\n    const textPromise = new Promise<string>((resolve, reject) => {\n      resolveText = resolve;\n      rejectText = reject;\n    });\n\n    const fullStream = new ReadableStream<ChunkType>({\n      start: async controller => {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/agent-sdks/acp/src/agent.ts#L105-L141","documentation":"The Mastra instance has a storage adapter, but storage.getStore('agents') returned undefined, meaning the adapter in use does not implement/expose the agents domain store. Versioning handlers require the agents store specifically and fail closed with a 500 HTTPException.","triggerScenarios":"Calling an agent-version endpoint when the storage adapter lacks the agents domain (e.g. a minimal/custom storage implementation that doesn't define getStore('agents'), or a legacy adapter predating the agents store).","commonSituations":"Custom storage adapters that implement only some domains (workflows, traces) but not agents; using an in-memory or third-party adapter that hasn't implemented the agents store; upgrading Mastra while keeping an old adapter that is missing new domain stores.","solutions":["Switch to a storage adapter that implements the agents store (Postgres/Upstash/LibSQL/etc. official adapters)","Update the storage adapter package to the latest version so all domain stores are implemented","If using a custom adapter, implement getStore('agents') (getById, getVersion, listVersions, etc.)","Check the version matrix between @mastra/core and the storage adapter package for compatibility"],"exampleFix":"// before\nstorage: new MinimalStorage({ connection }) // no agents domain\n// after\nstorage: new PostgresStore({ connectionString: process.env.DATABASE_URL }) // implements agents store","handlingStrategy":"type-guard","validationCode":"const storage = mastra.getStorage();\nif (!storage || typeof storage.getStore !== 'function') throw new Error('Invalid storage adapter');\nconst agentsStore = await storage.getStore('agents');\nif (!agentsStore) throw new Error('Storage adapter does not implement agents domain');","typeGuard":"function implementsAgentsStore(s: any): boolean {\n  const store = s?.getStore?.('agents');\n  return !!store && typeof store.getById === 'function' && typeof store.getVersion === 'function';\n}","tryCatchPattern":"try {\n  await callAgentVersionsApi();\n} catch (e) {\n  if (isHttpError(e) && e.status === 500 && /Agents storage domain is not available/.test(e.message)) {\n    // swap to an adapter implementing the agents store\n  } else throw e;\n}","preventionTips":["Use official storage adapters that implement all domains","Keep the adapter package upgraded in lockstep with @mastra/core","Test getStore('agents') at bootstrap in integration tests","Document domain coverage when writing custom adapters"],"tags":["storage","adapter","agents-store","server","http-500"],"backgroundTag":"storage-domain-unavailable","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}