Documentation

AI deploy fixes

When a deploy fails, an AI agent explains the root cause in plain words and can open a pull request with the fix.

When a build, pre-deploy command or health check fails, Rebasable starts an AI diagnosis automatically. A few seconds later the deploy page shows:

  • What went wrong, in plain language (English or Spanish, following your account language).
  • The root cause, pointing to the file and line when it can.
  • A suggested fix, as a code diff or a settings change (for example a wrong start command or a missing env var).
  • Fix it: for GitHub repositories, one click opens a pull request on a branch named rebasable/fix-<deployId> with the change. Review and merge it like any other PR, and the push deploys again.

What the agent looks at

  • The build and runtime logs of the failed deploy.
  • Your source code at that commit (the files relevant to the error).
  • The service settings and the names of your environment variables. Values and secrets are never sent to the model.

Where to find it

  • Dashboard: the failed deploy, AI diagnosis panel.
  • CLI: rebasable deploys fix <deployId> (add --pr to open the pull request).
  • MCP: the explain_failed_deploy tool, so your coding agent can read the diagnosis and fix the code itself.
  • API: GET /v1/aifix?deployId=..., POST /v1/aifix/{id}/pr.

Examples it handles well

  • App listening on localhost or a hardcoded port instead of PORT.
  • Missing dependency, wrong Node/Python version, lockfile out of sync.
  • Missing environment variable at startup (KeyError: 'DATABASE_URL').
  • Failing migrations in the pre-deploy command.
  • Wrong build or publish directory for static sites.
  • Out of memory during build or at runtime, with a suggested instance type.

Privacy

The diagnosis uses a large language model. We send only what is needed (logs, relevant code, setting names). It is included on every plan, including Hobby. Pull requests are only opened when you click Fix it or pass --pr.