A conversation can fail because its memory helper is unavailable even when the main agent could answer. A Mastra user report described roughly four minutes of fixed retries before synchronous observation aborted a turn. The change merged September 26 exposes a TypeScript configuration API for deciding what happens next.
In Mastra’s Memory options, both observation and reflection now accept maxRetries and failurePolicy. The defaults remain eight retries after the first call and 'abort'. Opting into 'continue' permits a turn to proceed after recognized Observer or Reflector model failures, with diagnostics and the failed input retained for later processing.
Practical example: an interview notebook
Consider an agent helping a researcher organize an interview as it happens. A temporary memory-model failure should not necessarily interrupt the next question. For a disposable prototype using a version that contains the new options, the public API definition supports setting a short retry budget on both stages:
const memory = new Memory({
options: {
observationalMemory: {
observation: { maxRetries: 2, failurePolicy: 'continue' },
reflection: { maxRetries: 2, failurePolicy: 'continue' },
},
},
});
This is a configuration fragment, with the import, model and storage setup omitted. Observation produces the memory notes; reflection consolidates them. A reflection failure leaves already-persisted observations in place. Setting only one stage to continue leaves the other able to abort the turn.
Copy-paste agent instruction
In a disposable Mastra interview-notebook prototype,
first check that the installed version supports
observation/reflection maxRetries and failurePolicy.
Configure both stages for 2 retries and 'continue'.
Use synthetic notes. Inject a recognized memory-model
failure and record diagnostics, pending input and
whether the main turn finishes. Restore the model,
check that pending notes are processed, and separately
confirm that cancellation still stops the turn.
Report the exact version and results. Do not change
production settings or claim success from config alone.
Access and test caveat
We inspected the merged implementation, reference and tests; we did not run this prototype or verify a published package version containing the change. Live model calls need the provider access required by your setup and can incur charges. Use synthetic material for fault injection.
The guide makes the tradeoff explicit: unobserved messages remain pending and can accumulate until the main model’s context limit is reached. Cancellation, persistence, locking, invariant and unclassified failures still stop the turn. The option buys room to recover from selected model failures; it does not provide an unlimited memory outage buffer.