Introducing Error Diagnosis for Mastra Platform and CLI

Diagnose and fix failed deploys with helpful recommendations.

Paul ScanlonPaul Scanlon·

Sep 15, 2026

·

2 min read

You can now get an error diagnosis for failed deploys on the Mastra platform or via the CLI. Inspect by deploy ID, project, or environment, then copy the recommendations and hand off to your coding agent to fix.

Every failed deploy comes with an explanation of the error and recommendations that highlight the problem code. You can inspect the fix in-place, copy the diagnosis summary as markdown, or drill into the detailed logs when you need the raw output.

Before diagnosis, debugging a failed deploy meant reading raw build logs. Now the platform and CLI both return a summarized diagnosis that you, your coding agent, or downstream services can act on.

Errors are classified as either USER, SYSTEM, or THIRD_PARTY. Only USER errors show a diagnosis with recommendations.

Platform diagnosis

Read the diagnosis for any failed deployment on the Mastra platform:

CLI diagnosis

Or read the same diagnosis from your terminal using the Mastra CLI:

GNU BashTerminal
npm install -g mastra@latest
note
Requires mastra@1.30.0 or later, added in PR #23672.

Run with the failed deploy's ID:

GNU BashTerminal
mastra env diagnosis e8b0250b-4ffa-45b9-b811-debf17c5836e

Scoped by environmentproduction, staging, or any custom name:

GNU BashTerminal
mastra env diagnosis e8b0250b-4ffa-45b9-b811-debf17c5836e --environment staging

Or combine deploy ID, environment, and project:

GNU BashTerminal
mastra env diagnosis e8b0250b-4ffa-45b9-b811-debf17c5836e --environment staging --project a6f6f3b0-6dd9-48b0-b7e8-354736c264d8

For more information and full configuration options, see:

Share on X or LinkedIn
Paul Scanlon
Paul ScanlonTechnical Product Marketing Manager

Paul Scanlon sits between Developer Education and Product Marketing at Mastra. Previously, he was a Technical Product Marketing Manager at Neon and worked in Developer Relations at Gatsby, where he created educational content and developer experiences.

All articles by Paul Scanlon