unstale

npm / @mastra/core

@mastra/core

What changed in @mastra/core 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

11 breaking1 security5 deprecations45 new APIs and options1 performance8 behavior and defaults12 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@mastra/core 183 changes

Breaking changes 11

  • Invalid resume data now throws this error without consuming the suspended run, allowing another resume with valid data.

    1.78.0release notes

  • Without resourceId, the stream now delivers only tasks with no resource; pass allResources: true to subscribe across resources.

    1.78.0release notes

  • Memory derives its resource and thread from resource: and thread: scopes; conflicting values now cause a 400 error.

    1.78.0release notes

  • Commands exceeding the 256 MiB per-stream output limit reject with ProcessOutputLimitError.

    1.78.0release notes

  • Includes a result entry for every experiment ID on each item, ignores duplicate IDs, and throws if baselineId is not in experimentIds.

    1.77.0release notes

  • Provider-run tool errors are saved and returned as errors in later steps and recalled conversations, rather than as successful results.

    1.77.0release notes

  • Throws when called during a thread lifecycle transition.

    1.77.0release notes

  • Throws when called during a thread lifecycle transition.

    1.77.0release notes

  • Tool execute and request-context types now use transformed schema output types instead of a union of input and output types.

    1.77.0release notes

  • 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.0release notes

  • Resuming a workflow run that is not suspended now throws an error with this ID.

    1.77.0release notes

Security 1

  • 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.0release notes

Deprecations 5

  • Deprecated in favor of buildPreview.

    1.78.0release notes

  • Deprecated in favor of PREVIEW_MAX_LENGTH.

    1.78.0release notes

  • The pending-item storage helper methods are deprecated.

    1.77.0release notes

  • The modeId, modelId, state, and pending fields are deprecated as AgentController sessions restore saved thread state.

    1.77.0release notes

  • resolveToolCallId() is deprecated in favor of address-based suspension APIs.

    1.77.0release notes

New APIs and options 45

  • Read an agent's configured scopes.

    1.78.0release notes

  • Set allResources to true to subscribe to background task events across every resource.

    1.78.0release notes

  • Signal-triggered runs record signal metadata on the AGENT_RUN span for traceability.

    1.78.0release notes

  • Adds a tool hook before approval that can reject a call and return output to the model without pausing for approval.

    1.78.0release notes

  • Builds a readable preview from a decoded payload, capped at PREVIEW_MAX_LENGTH characters.

    1.78.0release notes

  • Builds a preview from stored JSON text, capped at PREVIEW_MAX_LENGTH characters.

    1.78.0release notes

  • Trace and span list results now include error previews.

    1.78.0release notes

  • Span query rows report whether error preview content was truncated.

    1.78.0release notes

  • Trusted middleware can inject scopes through this request context key.

    1.78.0release notes

  • Memory implementations can provide error processors that agents append to their resolved error processors.

    1.78.0release notes

  • 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.0release notes

  • Pass Infinity to retain all command output, subject to a 256 MiB per-stream limit.

    1.78.0release notes

  • Trace and span list results now include output previews alongside input previews.

    1.78.0release notes

  • Exports the shared maximum length used for generated and stored previews.

    1.78.0release notes

  • Set this option to true to retain strict mode for OpenAI structured output schemas with free-form keys.

    1.78.0release notes

  • Queue a typed signal behind an active run while preserving its type, tag, and attributes.

    1.78.0release notes

  • 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.0release notes

  • 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.0release notes

  • Adds a schema describing the dimensions and measures accepted by trace aggregation.

    1.78.0release notes

  • Identifies a resume attempt that lost the claim because another approval or resume is running or just finished.

    1.77.0release notes

  • Exported type describing the output stored for an agent experiment target.

    1.77.0release notes

  • Appends a buffered chunk to the current generation and reports whether it persisted and its record ID.

    1.77.0release notes

  • Claims a tool suspension and returns an address that can be used to respond after switching threads.

    1.77.0release notes

  • Writes active observations with an outcome indicating whether the write applied, and can reject stale or conflicting writes.

    1.77.0release notes

  • Supports provider_tool_call steps so trajectory expectations can cover provider-executed tools and compare their arguments, result, and success.

    1.77.0release notes

  • Exported type describing experiment result output.

    1.77.0release notes

  • Defines a sandbox-provider contract with optional tunable settings, repository templates, and template builds for Mastra Factory.

    1.77.0release notes

  • Accepts file attachments, which reach the model whether the message is sent immediately or queued behind an active run.

    1.77.0release notes

  • Formats W3C traceparent values for trace linking.

    1.77.0release notes

  • Reads the authenticated author attached to an AgentController session message.

    1.77.0release notes

  • Exports a helper for hosts that persist or key suspension addresses.

    1.77.0release notes

  • Spans can reference spans in other traces without joining those traces, and storage saves the links.

    1.77.0release notes

  • Setting this variable to 1 disables telemetry and skips Git discovery.

    1.77.0release notes

  • Parses W3C traceparent values for trace linking.

    1.77.0release notes

  • 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.0release notes

  • Accepts an authenticated message author that can later be read with getMessageAuthor.

    1.77.0release notes

  • Responds to a claimed tool suspension using its address and resume data.

    1.77.0release notes

  • Exported type describing the output stored for a scorer experiment target.

    1.77.0release notes

  • Accepts an authenticated message author that can later be read with getMessageAuthor.

    1.77.0release notes

  • Accepts an authenticated message author that can later be read with getMessageAuthor.

    1.77.0release notes

  • Accepts file attachments, which reach the model whether the message is sent immediately or queued behind an active run.

    1.77.0release notes

  • Observational memory records carry the ID of the newer generation that replaced them.

    1.77.0release notes

  • Exported address type for hosts that persist or key suspension addresses when claiming and resuming prompts after switching threads.

    1.77.0release notes

  • Experiment results include a target type that narrows output to typed agent or scorer output; other targets retain unknown output.

    1.77.0release notes

  • Transfers ownership of an AgentController thread to another owner.

    1.77.0release notes

Performance 1

  • Workflow steps, conditions, and dynamic sleeps create a writer stream only when code reads it, reducing memory churn in agent loops.

    1.77.0release notes

Behavior and default changes 8

  • Live assistant messages now include modelId and provider metadata, including the fallback model after fallback.

    1.78.0release notes

  • Previews for message lists show the last user message instead of joining every user message.

    1.78.0release notes

  • Suspended runs preserve their recorded scopes when resumed, and a resume cannot add scopes.

    1.78.0release notes

  • 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.0release notes

  • Memory stores streamed document citations as source-document parts with media type, title, and filename, preserving citations after reload.

    1.78.0release notes

  • Trace searches no longer have a 31-day maximum range; the range must still start before it ends.

    1.78.0release notes

  • A temporal-gap reminder signal sorts directly before the message it describes instead of appearing after it.

    1.77.0release notes

  • Durable agent step results now include each step's response messages and model ID, matching regular agents.

    1.77.0release notes

Fixes and other changes 12

  • Registered durable agents now run through their durable wrapper in workflow steps on both engines.

    1.78.0release notes

  • Workflow agent steps now support durable agents on both execution engines.

    1.78.0release notes

  • Claims a suspended run before resuming it, preventing concurrent callers from running the same tool twice.

    1.77.0release notes

  • Claims a suspended run before resuming it, preventing concurrent callers from running the same tool twice.

    1.77.0release notes

  • Scorers receive every response message across suspend/resume segments under the original run ID, including when observational memory is enabled.

    1.77.0release notes

  • 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.0release notes

  • Tools returned by an input processor now receive the agent's ID in context.agent.agentId, in regular and durable agents.

    1.77.0release notes

  • Claims a suspended run before resuming it, preventing concurrent callers from running the same tool twice.

    1.77.0release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes