mastra-ai/mastra · error
AcpAgent does not support resuming suspended stream calls
Error message
AcpAgent does not support resuming suspended stream calls
What it means
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.
Source
Thrown at agent-sdks/acp/src/agent.ts:123
const messageList = this.createMessageList(messages, text);
return {
text,
response: {
dbMessages: messageList.get.response.db(),
},
toolResults: [],
finishReason: 'stop',
runId: options?.runId ?? randomUUID(),
};
}
async resumeGenerate(): Promise<SubAgentGenerateResult> {
throw new Error('AcpAgent does not support resuming suspended generate calls');
}
async resumeStream(): Promise<SubAgentStreamResult> {
throw new Error('AcpAgent does not support resuming suspended stream calls');
}
async stream(messages: MessageListInput, options?: AgentStreamOptions): Promise<SubAgentStreamResult> {
const runId = options?.runId ?? randomUUID();
const prompt = this.getPrompt(messages, options?.instructions);
const signal = (options as { abortSignal?: AbortSignal } | undefined)?.abortSignal;
const messageList = new MessageList();
messageList.add(messages, 'input');
let resolveText!: (text: string) => void;
let rejectText!: (error: unknown) => void;
const textPromise = new Promise<string>((resolve, reject) => {
resolveText = resolve;
rejectText = reject;
});
const fullStream = new ReadableStream<ChunkType>({
start: async controller => {View on GitHub (pinned to 75dd419e61)
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
Example fix
// before
storage: new MinimalStorage({ connection }) // no agents domain
// after
storage: new PostgresStore({ connectionString: process.env.DATABASE_URL }) // implements agents store Defensive patterns
Strategy: type-guard
Validate before calling
const storage = mastra.getStorage();
if (!storage || typeof storage.getStore !== 'function') throw new Error('Invalid storage adapter');
const agentsStore = await storage.getStore('agents');
if (!agentsStore) throw new Error('Storage adapter does not implement agents domain'); Type guard
function implementsAgentsStore(s: any): boolean {
const store = s?.getStore?.('agents');
return !!store && typeof store.getById === 'function' && typeof store.getVersion === 'function';
} Try / catch
try {
await callAgentVersionsApi();
} catch (e) {
if (isHttpError(e) && e.status === 500 && /Agents storage domain is not available/.test(e.message)) {
// swap to an adapter implementing the agents store
} else throw e;
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- ClaudeSDKAgent resumeData must include a message.
- AcpAgent does not support resuming suspended generate calls
- ACP prompt stopped before completing: ${response.stopReason}
- MCP clients storage domain is not available
- Memory storage was not available while storing the response
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/4401758e595176eb.
Report an issue: GitHub.