github mastra-ai/mastra @mastra/core@1.63.0
August 26, 2026

latest releases: mastracode@0.37.0, mastra@1.27.1, create-mastra@1.27.1...
5 hours ago

Highlights

Trace-correlated logging via the new logger adapter contract

A new AdaptableLogger contract in @mastra/core/logger standardizes trace correlation by injecting trace_id/span_id into native log records during traced operations, and deriving observability LogEvents from the same record. Mastra now supports loggerOptions to control correlation and log export, and the legacy dual-write wrapper path is deprecated.

First-class Pino integration with trace context in every transport

@mastra/loggersPinoLogger now implements the adapter contract, so trace fields are added via a pino mixin to stdout, files, and custom transports—while preserving user mixin fields. This aligns native application logs with Mastra observability without separate logging pipelines.

More reliable trace/log linking for non-exported spans (no more “Span not found”)

Across @mastra/core and @mastra/observability, logs/metrics emitted inside internal or excluded spans now link to the nearest ancestor span that actually reaches exporters, and omit spanId when none exists. This fixes broken click-through from Studio and ensures stdout correlation matches stored observability records.

Deployment readiness improvements: worker health gating

@mastra/deployer now ships a dedicated worker entry in standard build artifacts, and the worker runtime exposes a /health endpoint that returns 503 during startup and 200 once workers are initialized. This enables deployment platforms to block rollouts until workers are actually ready.

Scheduler + resume robustness fixes (fewer restarts, fewer duplicate runs)

Workers now discover and run schedules created after startup without requiring a restart. Tool/background-task resuming is also hardened (supports falsy resume payloads like false/0/""), preventing suspended background tasks from accidentally starting a second run and ensuring replayed tool-call chunks are preserved for reloading clients.

Breaking Changes

  • @mastra/playground-ui DataList API cleanup: removed variant="lined", flushLeft/flushRight, per-cell height, and DataList.MonoCell (use DataList.TextCell font="mono" instead).

Changelog

@mastra/core@1.63.0

Minor Changes

  • Added a logger adapter contract (AdaptableLogger in @mastra/core/logger) for trace-correlated log output. Loggers implementing the adapter inject trace_id and span_id into their native log records during traced operations, and the observability LogEvent is derived from that same record. The built-in ConsoleLogger implements the contract. A new loggerOptions config on Mastra controls the behavior: (#21753)

    import { Mastra } from '@mastra/core/mastra';
    
    export const mastra = new Mastra({
      loggerOptions: {
        correlation: true, // inject trace_id/span_id into native output (default: true)
        export: true, // forward log records to observability storage (default: true)
      },
    });

    Custom IMastraLogger implementations without adapter support continue to work through the existing dual-write wrapper, which is now deprecated and will be removed in the next major version.

Patch Changes

  • Update provider registry and model documentation with latest models and providers (7176362)

  • Fixed worker processes to discover and run schedules created after startup without requiring a restart or explicit scheduler configuration. (#22420)

  • Fixed output stream processor traces remaining open when streams close or are canceled before a finish chunk. (#22397)

  • Added an optional getExportedSpanId() method to the Span interface. It returns the span's own id when the span reaches exporters, and the nearest exportable ancestor's id when it does not. (#22286)

    Suspending workflow and agent runs now use it, so a resumed run links to a span that was actually exported instead of leaving its child spans orphaned in the trace.

  • Fixed resuming a tool with a falsy resume payload. (#22363)

    A tool whose resumeSchema is a primitive can be resumed with false, 0 or "", and false is how a boolean human-in-the-loop tool declines. Those payloads were read as "no resume data".

    Background tasks no longer start a second run

    Resuming a suspended background task with one of those payloads left the task suspended forever and dispatched a new one. It now resumes the existing task.

    Same-run resumes keep their tool call

    A reloading client now still receives the replayed tool-call chunk, and the tool call is still recorded to memory when no matching invocation is on the message list.

  • Fixed stdout log lines carrying a span id that cannot be looked up. (#22387)

    When trace correlation is enabled, trace_id/span_id are injected into structured stdout logs. A log emitted inside an internal span, or one dropped by excludeSpanTypes, was tagged with that span's own id — but such spans are never exported, so clicking through from the logs view found nothing, and the stdout line disagreed with the stored log record for the same event.

    Stdout lines now carry the nearest span id that actually reaches exporters, matching the stored record. When nothing in the chain is exportable, the line keeps trace_id and omits span_id — the trace is still addressable even though no individual span is. span_id is now optional on TraceFields, so consumers parsing these lines should treat it as possibly absent.

  • Added storage documentation links to errors that require persistent storage. (#22367)

    Also in: @mastra/slack@1.6.2

@mastra/deployer@1.63.0

Patch Changes

  • Added a dedicated worker entry to standard build artifacts. The worker runtime exposes a /health endpoint that returns 503 during startup and 200 after workers initialize, so deployment platforms can gate rollout on worker readiness. (#22393)

@mastra/dsql@1.3.3

Patch Changes

  • Fix missing $ prefix on the WHERE id placeholder in AgentsDSQL.update(), which caused "operator does not exist: text = integer" on every agent update. (#22389)

@mastra/factory@0.10.1

Patch Changes

  • Fixed the Work and Review boards always showing a horizontal scrollbar for people whose system draws classic (space-taking) scrollbars. The board's scroll area now reserves its scrollbar gutter, so the filter toolbar — sized to the visible width of that area — can no longer end up wider than the space it has to fit in. (#22371)

  • Factory pages now share one app shell instead of two near-identical private ones. The shell takes a scroll prop naming who owns the scrolling — document for pages that scroll natively, viewport for chat pages whose content owns nested scroll regions — so a page can no longer silently pick the wrong frame. (#22366)

  • Reworked the settings pages so every option reads as the same kind of row. (#22375)

    • Work Intake is now one section per source — GitHub issues, Linear issues, and Linear routing — instead of both sources stacked in a single card. Linear's connection state (connect, reconnect, expired, workspace name) moved into its section header. Both sources now use the same picker: one search box that spans every Linear team instead of a search per collapsed team, with the repositories and projects listed straight away, inset from the card edges and scrolling in the same scroll area the rest of the app uses.
    • Memory renders observational-memory options as regular settings rows instead of a stacked block with its own padding.
    • Models shows the Provider access tabs above the card instead of inside it, and each provider is a settings row rather than a data-list row.
    • Repositories gives the setup and teardown commands one row each, per repository, with the command field on the right like every other setting and a line saying when it runs. Both save on their own when you leave the field, so there is no save button to hunt for.
    • Repositories lists the repositories you can link the same way — a standard search field, rows aligned with the card, and grouped under "Linked" and "Available" instead of each row drawing its own box.
    • Section actions such as "Manage GitHub connection" now sit on the right of the section title instead of below the description.
  • Removed the app shell's blanket overflow clipping. Every scroll region already declares its own scroll container, so the shell-level clipping only hid layout bugs by silently cutting content; a genuine overflow now shows up as a visible scrollbar instead. (#22345)

  • Factory now uses Mona Sans across the whole app, matching Studio, instead of the system font. (#22385)

    The sidebar was retuned to go with it: each section is titled by what it lists, with an icon for work items, review sessions and user sessions, and the "Factory" title is gone since the links under it name themselves.

  • Retuned the Factory chat so the composer and the tool output read as part of the conversation. (#22403)

    • The text you type is now the same size as the transcript, in a softer grey, on a lighter box.
    • The composer sits slightly wider than the messages above it and closer to the bottom edge, at every screen width.
    • Slash command suggestions highlight the selected row against the lighter composer instead of blending into it.
    • Diff blocks inside a tool call sit one step above the chat surface, so they read as a block again.

@mastra/loggers@1.3.0

Minor Changes

  • PinoLogger now implements the Mastra logger adapter contract. During traced operations, a pino mixin injects trace_id and span_id into every native log record (stdout, files, and custom transports), and the observability log export is derived from the same record. User-supplied mixin fields are preserved, with trace fields taking precedence on conflict. (#21753)

    import { Mastra } from '@mastra/core/mastra';
    import { PinoLogger } from '@mastra/loggers';
    
    export const mastra = new Mastra({
      logger: new PinoLogger({ name: 'Mastra', level: 'info' }),
    });
    
    // During a traced run, stdout lines carry matching trace context:
    // {"level":30,"name":"Mastra","trace_id":"0af7651916cd43dd8448eb211c80319c","span_id":"b7ad6b7169203331","msg":"tool executed"}

@mastra/observability@1.17.3

Patch Changes

  • Fixed the "Span not found." error when opening the span linked from a log or metric in Studio. (#22286)

    Logs and metrics emitted inside an internal or excluded span were stamped with that span's own id. Those spans are dropped before export, so the id referenced a span no exporter ever received, and clicking through from a log detail panel returned a 404.

    Logs and metrics now resolve to the nearest ancestor span that actually reaches exporters, and omit spanId entirely when no such ancestor exists. This applies to newly emitted signals; already-stored logs and metrics keep the ids they were written with.

@mastra/playground-ui@51.2.0

Minor Changes

  • Refreshed the DataList look: rows no longer draw separators, the sticky header and group subheaders share one lighter, theme-tuned band, and every corner uses the same radius. (#22383)

    Every row in a list is now the same height. Row height used to be whatever the tallest cell happened to be, so a list with an actions column or a roomier cell drifted a few pixels away from the list next to it. The row owns its height now, and skeleton rows match the real ones — no jump when data lands.

    Typography follows the content. Headers and name cells are medium weight instead of semibold, and the letter-spacing tightening is gone. IDs and timestamps left the monospace face — IDs get wider tracking to stay scannable, timestamps get tabular figures so their columns still line up.

    Row controls only appear on hover. Selection checkboxes on unselected rows, and the new DataList.ActionsCell, stay hidden until you hover the row or reach it with the keyboard, so a resting list reads as content. The column keeps its width, so nothing shifts. On a touch screen, where nothing ever hovers, they stay visible.

    // Trailing row actions — alignment, spacing and the hover reveal come with the cell
    <DataList.RowWrapper>
      <DataList.RowButton colEnd={-2} onClick={open}>
        {cells}
      </DataList.RowButton>
      <DataList.ActionsCell>
        <Button variant="ghost" size="icon-xs" aria-label="Delete">
          <Trash2 />
        </Button>
      </DataList.ActionsCell>
    </DataList.RowWrapper>

    Breaking: a variant, three props and a component that no longer decide anything are gone.

    // Before
    <DataList columns={columns} variant="lined">
      <DataList.RowButton flushLeft flushRight colEnd={-2}>
        <DataList.Cell height="compact">{status}</DataList.Cell>
        <DataList.MonoCell>{path}</DataList.MonoCell>
    
    // After — rows are borderless, full-bleed and uniformly tall by default
    <DataList columns={columns}>
      <DataList.RowButton colEnd={-2}>
        <DataList.Cell>{status}</DataList.Cell>
        <DataList.TextCell font="mono">{path}</DataList.TextCell>
    • variant="lined" existed only to draw row separators. Lists that want row banding can still ask for variant="striped".
    • height on cells set row height one cell at a time, which is what let rows drift apart.
    • flushLeft / flushRight dropped a row margin that no longer exists.
    • DataList.MonoCell was a cell that only changed the typeface. DataList.TextCell font="mono" replaces it — same rendering, one less component.

Patch Changes

  • Added a Comment family of compound components for text-only comment threads: Comment, CommentList, CommentItem (with header, author, timestamp, body and actions slots) and CommentComposer (input + send button). The root variant prop switches between default, a flat thread with hover-revealed per-item actions, and embed, the same thread on a bordered card surface with a compact composer and no per-item actions. (#22396)

  • Improved the experiment page in Studio with a horizontal metadata bar showing when the run started, how long it took, the dataset it ran against, and which scorers were used (#22377)

  • Composer — the ring keeps its geometry on the element, so a consumer can restyle its radius and width through className like any other component. Its idle edge colour now reads --composer-ring-edge, for apps whose chat surface needs a different one; unset, it keeps the current blend. (#22403)

    Tool call — output blocks sit one step above the surface behind them instead of painting a fixed dark grey, so they stay visible on any chat background and in both themes.

  • Sidebar links read a touch heavier, so they stay legible next to their icons instead of looking washed out. (#22399)

  • Fixed the span Feedback tab in Studio's observability view showing the same list and count for every span of a trace: it now loads feedback strictly for the selected trace and span pair, so switching spans shows that span's own feedback. Trace-level feedback — including everything produced by the dataset review flows — now lives in a new Feedback tab on the trace panel, next to Details and Evaluations, which lists only records that aren't attached to a span. The span panel tabs also use the same pill styling as the rest of Studio instead of the deprecated underline variant. (#22401)

    To see each kind of feedback:

    1. Run mastra dev and open Observability in Studio.
    2. Open a trace and select its Feedback tab — it lists trace-level feedback only, such as records left by dataset review.
    3. Select a span in the trace tree and open the span's Feedback tab — it lists only that span's feedback, and the list changes as you select other spans.
  • Added a factory variant to the SettingsRow component so settings rows can render the denser card-row layout (row padding, 12px description text) instead of only the studio spacing. (#22375)

    <SettingsRow variant="factory" label="Auto-approve tools" description="Run tool calls without asking">
      <Switch checked={autoApprove} onCheckedChange={setAutoApprove} />
    </SettingsRow>

Other updated packages

The following packages were updated with dependency changes only:

Don't miss a new mastra release

NewReleases is sending notifications on new releases.