# What changed in @mastra/core

> 83 changes in @mastra/core 1 from its official release notes, upgrade guides and advisories: 11 breaking, 5 deprecations, 1 security, 45 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@mastra/core/

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

## @mastra/core 1

### Breaking changes

- Invalid resume data now throws this error without consuming the suspended run, allowing another resume with valid data. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Without resourceId, the stream now delivers only tasks with no resource; pass allResources: true to subscribe across resources. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Memory derives its resource and thread from resource: and thread: scopes; conflicting values now cause a 400 error. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Commands exceeding the 256 MiB per-stream output limit reject with ProcessOutputLimitError. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Includes a result entry for every experiment ID on each item, ignores duplicate IDs, and throws if `baselineId` is not in `experimentIds`. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Provider-run tool errors are saved and returned as errors in later steps and recalled conversations, rather than as successful results. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Throws when called during a thread lifecycle transition. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Throws when called during a thread lifecycle transition. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Tool execute and request-context types now use transformed schema output types instead of a union of input and output types. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- A model passed to a durable agent's `stream()` call is now the model that actually runs, rather than the agent's default model. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Resuming a workflow run that is not suspended now throws an error with this ID. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)

### Security

- When an output processor blocks a reply, saved reply messages are deleted so blocked text is not retained or sent to the model on the next turn. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)

### Deprecations

- Deprecated in favor of buildPreview. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Deprecated in favor of PREVIEW_MAX_LENGTH. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- The pending-item storage helper methods are deprecated. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- The `modeId`, `modelId`, `state`, and `pending` fields are deprecated as AgentController sessions restore saved thread state. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- `resolveToolCallId()` is deprecated in favor of address-based suspension APIs. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)

### New APIs and options

- Read an agent's configured scopes. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Set allResources to true to subscribe to background task events across every resource. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Signal-triggered runs record signal metadata on the AGENT_RUN span for traceability. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Adds a tool hook before approval that can reject a call and return output to the model without pausing for approval. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Builds a readable preview from a decoded payload, capped at PREVIEW_MAX_LENGTH characters. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Builds a preview from stored JSON text, capped at PREVIEW_MAX_LENGTH characters. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Trace and span list results now include error previews. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Span query rows report whether error preview content was truncated. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Trusted middleware can inject scopes through this request context key. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Memory implementations can provide error processors that agents append to their resolved error processors. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Adds the error-processor support required for Observational Memory to recover from context-window overflows; older core versions pass the error to the caller. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Pass Infinity to retain all command output, subject to a 256 MiB per-stream limit. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Trace and span list results now include output previews alongside input previews. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Exports the shared maximum length used for generated and stored previews. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Set this option to true to retain strict mode for OpenAI structured output schemas with free-form keys. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Queue a typed signal behind an active run while preserving its type, tag, and attributes. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Agents accept scopes per call, on the agent, or from trusted middleware; Mastra merges them to identify the addresses a run acts as. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Agents can use scopes: resource and thread scopes determine memory identity, other scopes reach tools and processors, and resumed runs retain and validate their scopes. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Adds a schema describing the dimensions and measures accepted by trace aggregation. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Identifies a resume attempt that lost the claim because another approval or resume is running or just finished. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Exported type describing the output stored for an agent experiment target. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Appends a buffered chunk to the current generation and reports whether it persisted and its record ID. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Claims a tool suspension and returns an address that can be used to respond after switching threads. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Writes active observations with an outcome indicating whether the write applied, and can reject stale or conflicting writes. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Supports `provider_tool_call` steps so trajectory expectations can cover provider-executed tools and compare their arguments, result, and success. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Exported type describing experiment result output. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Defines a sandbox-provider contract with optional tunable settings, repository templates, and template builds for Mastra Factory. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Accepts file attachments, which reach the model whether the message is sent immediately or queued behind an active run. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Formats W3C `traceparent` values for trace linking. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Reads the authenticated author attached to an AgentController session message. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Exports a helper for hosts that persist or key suspension addresses. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Spans can reference spans in other traces without joining those traces, and storage saves the links. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Setting this variable to `1` disables telemetry and skips Git discovery. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Parses W3C `traceparent` values for trace linking. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Gateway provider configs can specify model prices in USD per 1 million tokens so private or reseller model calls can receive cost estimates. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Accepts an authenticated message author that can later be read with `getMessageAuthor`. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Responds to a claimed tool suspension using its address and resume data. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Exported type describing the output stored for a scorer experiment target. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Accepts an authenticated message author that can later be read with `getMessageAuthor`. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Accepts an authenticated message author that can later be read with `getMessageAuthor`. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Accepts file attachments, which reach the model whether the message is sent immediately or queued behind an active run. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Observational memory records carry the ID of the newer generation that replaced them. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Exported address type for hosts that persist or key suspension addresses when claiming and resuming prompts after switching threads. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Experiment results include a target type that narrows `output` to typed agent or scorer output; other targets retain `unknown` output. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Transfers ownership of an AgentController thread to another owner. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)

### Performance

- Workflow steps, conditions, and dynamic sleeps create a writer stream only when code reads it, reducing memory churn in agent loops. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)

### Behavior and default changes

- Live assistant messages now include modelId and provider metadata, including the fallback model after fallback. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Previews for message lists show the last user message instead of joining every user message. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Suspended runs preserve their recorded scopes when resumed, and a resume cannot add scopes. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Command output retains the newest 1 MiB of stdout and stderr by default; truncation is reported, and maxRetainedBytes can change the retained limit. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Memory stores streamed document citations as source-document parts with media type, title, and filename, preserving citations after reload. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Trace searches no longer have a 31-day maximum range; the range must still start before it ends. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- A temporal-gap reminder signal sorts directly before the message it describes instead of appearing after it. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Durable agent step results now include each step's response messages and model ID, matching regular agents. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)

### Fixes and other changes

- Registered durable agents now run through their durable wrapper in workflow steps on both engines. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Workflow agent steps now support durable agents on both execution engines. (1.78.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.78.0)
- Claims a suspended run before resuming it, preventing concurrent callers from running the same tool twice. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Claims a suspended run before resuming it, preventing concurrent callers from running the same tool twice. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Scorers receive every response message across suspend/resume segments under the original run ID, including when observational memory is enabled. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Evented agents and nested evented workflows can resolve steps reachable only through a parent workflow when an orchestration worker calls the API server. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Tools returned by an input processor now receive the agent's ID in `context.agent.agentId`, in regular and durable agents. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Claims a suspended run before resuming it, preventing concurrent callers from running the same tool twice. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Redis, Spanner, Upstash, and Valkey stores reject writes from durable agent executions that lost their run to crash recovery, preventing them from overwriting recovered state. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Durable, evented, and Inngest agents no longer leak one run's messages into another run's prompt when Mastra instances reuse a run ID in the same process. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- An idle stream on the same thread adopts still-running and pending background tasks from the replaced stream so their completion can trigger a continuation turn. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
- Uses only the final answer of a run, preventing pre-tool text or earlier JSON drafts from failing validation or ending the run early. (1.77.0) — [release notes](https://github.com/mastra-ai/mastra/releases/tag/%40mastra/core%401.77.0)
