mastra-ai/mastra · error

Restart was accepted but no deploy ID could be resolved. Che

Error message

Restart was accepted but no deploy ID could be resolved. Check the Mastra platform for deployment status.

What it means

Thrown by restartServerProject in the Mastra CLI after polling repeatedly for a deploy ID following a platform server restart. The platform accepted the restart request, but no deployment ever produced a resolvable deploy ID within the polling window, so the CLI cannot report which deployment the restart created. It directs the user to inspect the Mastra platform dashboard for deployment status.

Source

Thrown at packages/cli/src/commands/server/platform-api.ts:399

          currentToken = await getToken();
          pollClient = createApiClient(currentToken, orgId);
          continue;
        }
        if (statusResponse.status !== 404) {
          throwApiError(
            'Failed to fetch server deploy status',
            statusResponse.status,
            extractApiErrorDetail(statusError),
          );
        }
      } else if (deployIndicatesAcceptedRestart(st?.status)) {
        return latest;
      }
    }
    await new Promise(r => setTimeout(r, 2000));
  }

  throw new Error(
    'Restart was accepted but no deploy ID could be resolved. Check the Mastra platform for deployment status.',
  );
}

/**
 * Poll the server deploy logs endpoint and print new log lines.
 * Server deploys don't have SSE streaming — we poll the JSON endpoint.
 */
async function pollServerLogs(deployId: string, token: string, orgId: string, signal: AbortSignal): Promise<void> {
  await new Promise(r => setTimeout(r, 3000));

  let printedBuild = 0;
  let printedDeploy = 0;
  let currentToken = token;
  let client = createApiClient(currentToken, orgId);

  while (!signal.aborted) {
    try {

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Open the Mastra platform dashboard and check the deployment status for the project to see if the deploy failed or is still pending.
  2. Re-run the restart command once the platform is healthy.
  3. Check platform deploy logs for the project to identify why the deployment never produced an ID.
  4. Verify your CLI auth token and organization/project linkage with `mastra studio` commands, then retry.
Defensive patterns

Strategy: retry

Try / catch

try {
  await restartServerProject(...);
} catch (err) {
  if ((err as Error).message.includes('no deploy ID could be resolved')) {
    // check platform dashboard / poll deploy status manually, then retry once
    await new Promise(r => setTimeout(r, 30000));
    return restartServerProject(...);
  }
  throw err;
}

Prevention

When it happens

Trigger: Calling `mastra` server restart (restartServerProject) when the platform accepts the restart request but the subsequent deploy never starts, fails immediately, or takes longer than the polling loop's timeout to produce latest.deployId.

Common situations: Platform outage or degraded deploy pipeline during a restart; the restarted deployment fails at build stage so no deploy ID is ever assigned; slow platform deploys exceeding the CLI's polling budget; stale auth leaving the poll receiving empty deploy lists.

Related errors


AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30). Data as JSON: /api/errors/36810b6fabd7b29d. Report an issue: GitHub.