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:
npm install -g mastra@latestmastra@1.30.0 or later, added in PR #23672.Run with the failed deploy's ID:
mastra env diagnosis e8b0250b-4ffa-45b9-b811-debf17c5836eScoped by environment — production, staging, or any custom name:
mastra env diagnosis e8b0250b-4ffa-45b9-b811-debf17c5836e --environment stagingOr combine deploy ID, environment, and project:
mastra env diagnosis e8b0250b-4ffa-45b9-b811-debf17c5836e --environment staging --project a6f6f3b0-6dd9-48b0-b7e8-354736c264d8For more information and full configuration options, see:
