# What changed in @mastra/memory

> 26 changes in @mastra/memory 1 from its official release notes, upgrade guides and advisories: 2 breaking, 8 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/npm/@mastra/memory/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @mastra/memory 1

### Breaking changes

- A multiplier blockAfter now scales a per-thread messageTokens override instead of the instance threshold. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Merges are rejected with HTTP 400 when the storage adapter does not support atomic merges, rather than silently replacing the record. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)

### New APIs and options

- Set observationalMemory.observation.observeOnContextOverflow to false to turn off automatic recovery from context overflow. (1.38.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1380)
- Pass force: true to observe pending messages regardless of the threshold for that call only. (1.38.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1380)
- getStatus() now returns observationBlockAfter and inAsyncObservationBand to expose the observation blocking threshold and async observation band. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Lets applications override the model selected by automatic model resolution for a provider. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)
- Adds a method to merge partial working-memory updates from application code; PostgreSQL performs deep merges in a row-locked transaction when scope is resource. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)
- Previews the model ID that automatic model selection would pick, for uses such as settings UIs. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)
- Turns the automatically picked model ID into a model, allowing auto resolution to use application credentials and routing. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)
- Accepts mode: 'merge' for HTTP working-memory updates, merging partial updates rather than replacing the record. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)

### Behavior and default changes

- When a provider rejects a request for exceeding its context window, Observational Memory observes pending messages and retries once with smaller context. Requires a compatible @mastra/core version. (1.38.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1380)
- With async buffering, unobserved messages can grow beyond messageTokens before a step blocks; the default is 1.2, and setting it to 1 preserves synchronous observation at the threshold. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- The token budget now limits previous observations on every observation path; zero omits them, and the default false sends the full previous observations. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Buffering, activation, observation, reflection, and config-override writes for a thread or resource run one at a time within a process; due reflections take priority, and stuck writes stop blocking later writes after 60 seconds. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Default Reflector instructions now preserve concrete facts, changes of mind, and explicit statements of not knowing, refusing, or never having done something; custom instructions are still appended. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- The model, observation.model, and reflection.model defaults change to 'auto'. Observer and Reflector models resolve independently from the agent's main model on every call; set a concrete model ID to keep a fixed model. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)

### Fixes and other changes

- Long numbers are now counted accurately, so memory and token limits trigger at the right time. Estimates saved on existing messages are recalculated. (1.38.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1380)
- The end marker is written to the message carrying the cycle's start marker, preventing it from disappearing on save or overwriting the agent's streamed response. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Observer, reflector and fallback model lists no longer cause type checking complexity to grow with the number of model IDs. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Concurrent buffering, activation, observation, and reflection no longer lose or duplicate context across processes and durable agent steps; stale work after memory clearing or thread deletion is discarded. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Observations are kept in event order so outdated state is not recorded as newer than later user instructions. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Live scorers now receive every response message across suspend and resume segments under the original runId, including tool calls removed from agent context by observational memory. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- Semantic recall no longer misses a turn's new user message when background buffering picks it up on the first step. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- An empty working-memory result no longer replaces stored working memory; Mastra retries extraction while preserving other extracted values such as the thread title. (1.37.1) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1371)
- When an observational memory error stops a run, the user message and tool results from completed steps are saved first. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)
- Persistence and idle buffering now use the terminal message list accepted by the processor pipeline rather than the list captured by the observation turn. (1.37.0) — [release notes](https://github.com/mastra-ai/mastra/blob/ba2385ed939e980024859926953c03e8a1a8305a/packages/memory/CHANGELOG.md#1370)
