{"record":{"id":"36810b6fabd7b29d","repo":"mastra-ai/mastra","slug":"restart-was-accepted-but-no-deploy-id-could-be-res","errorCode":null,"errorMessage":"Restart was accepted but no deploy ID could be resolved. Check the Mastra platform for deployment status.","messagePattern":"Restart was accepted but no deploy ID could be resolved\\. Check the Mastra platform for deployment status\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/server/platform-api.ts","lineNumber":399,"sourceCode":"          currentToken = await getToken();\n          pollClient = createApiClient(currentToken, orgId);\n          continue;\n        }\n        if (statusResponse.status !== 404) {\n          throwApiError(\n            'Failed to fetch server deploy status',\n            statusResponse.status,\n            extractApiErrorDetail(statusError),\n          );\n        }\n      } else if (deployIndicatesAcceptedRestart(st?.status)) {\n        return latest;\n      }\n    }\n    await new Promise(r => setTimeout(r, 2000));\n  }\n\n  throw new Error(\n    'Restart was accepted but no deploy ID could be resolved. Check the Mastra platform for deployment status.',\n  );\n}\n\n/**\n * Poll the server deploy logs endpoint and print new log lines.\n * Server deploys don't have SSE streaming — we poll the JSON endpoint.\n */\nasync function pollServerLogs(deployId: string, token: string, orgId: string, signal: AbortSignal): Promise<void> {\n  await new Promise(r => setTimeout(r, 3000));\n\n  let printedBuild = 0;\n  let printedDeploy = 0;\n  let currentToken = token;\n  let client = createApiClient(currentToken, orgId);\n\n  while (!signal.aborted) {\n    try {","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/cli/src/commands/server/platform-api.ts#L381-L417","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the Mastra platform dashboard and check the deployment status for the project to see if the deploy failed or is still pending.","Re-run the restart command once the platform is healthy.","Check platform deploy logs for the project to identify why the deployment never produced an ID.","Verify your CLI auth token and organization/project linkage with `mastra studio` commands, then retry."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await restartServerProject(...);\n} catch (err) {\n  if ((err as Error).message.includes('no deploy ID could be resolved')) {\n    // check platform dashboard / poll deploy status manually, then retry once\n    await new Promise(r => setTimeout(r, 30000));\n    return restartServerProject(...);\n  }\n  throw err;\n}","preventionTips":["Check the platform deployment status before and after restarting.","Retry restarts only when the platform is healthy (no ongoing incidents).","Keep CLI auth fresh so polling receives complete deploy lists.","Allow generous time for slow platform deploys before restarting again."],"tags":["cli","deploy","platform","timeout"],"backgroundTag":"deploy-id-unresolved","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}