npm / @mastra/client-js
@mastra/client-js
What changed in @mastra/client-js 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
3 breaking1 deprecations19 new APIs and options4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@mastra/client-js 127 changes
Breaking changes 3
Supports mode: 'merge' for atomic working-memory merges; requests are rejected with HTTP 400 when the storage adapter does not support atomic merges.
Requests conflicting with a run's state now return 409 Conflict instead of 500.
With reconnect enabled, resubscribe failures with 4xx or 501 errors now reject with the original error instead of retrying; other documented retry cases remain.
Deprecations 1
experimentIdA and experimentIdB still support two-experiment comparisons but are deprecated in favor of experimentIds.
New APIs and options 19
Adds a method for queuing a typed signal behind the active thread run.
Adds client-side trace aggregation by time range, grouping, and measures; check capabilities.traceAggregate before calling it.
Adds errorPreview to trace list rows and querySpans() rows.
Adds errorTruncated to querySpans() rows.
Adds outputPreview to trace list rows.
Adds an optional observability capability indicating how long traces are kept, so clients can avoid offering dates whose traces are gone.
An exported type describes the output stored for agent experiment targets, including preserved error details.
Compare two to ten experiments at once against a baseline by passing experimentIds and optionally baselineId.
An exported type describes experiment result output by target.
The /steer and /follow-up routes accept the files field and limits already supported by /messages.
AgentController followUp accepts file attachments, including when the message is queued behind an active run.
Generated Agent Controller tool-suspension route types now include an optional run id field.
An exported type describes the output stored for scorer experiment targets.
AgentController steer accepts file attachments, including when the message is queued behind an active run.
Experiment results include targetType, which lets TypeScript narrow output to typed agent or scorer results; workflow, processor, and caller-driven outputs remain unknown.
Gets an experiment by ID without requiring its dataset.
Added as a trace-query operator in the generated trace-query types.
Added as a trace-query operator in the generated trace-query types.
The Client SDK recognizes this live session event, allowing web clients to respond immediately to the agent's task-completion verdict.
Fixes and other changes 4
Failed agent runs now store error.message and error.stack instead of an empty object.
Session streams send the current display state as their first event; merge currentMessage by message ID rather than appending it.
nestUnderParent is no longer dropped from agent and workflow requests sent over HTTP, preserving the run's parent-child trace relationship.
Forwards options, including speaker, to the voice provider; options.speaker takes precedence over the top-level speakerId when both are sent.