How to auto-fix failed Vercel builds with Claude
Deploy Center's Autofix checks for failed Vercel and Render builds every 10 minutes and hands each one, with the build log and secrets masked, to a Claude Code routine that fixes the error and opens a pull request. You review and merge the PR, then deploy the fix with one click.
- Build fails
- Claude Code routine
- Fix PR
- You merge
- One-click deploy
What you need
- Deploy Center on a Mac, connected to Vercel and/or Render.
- A Claude Code routine at claude.ai/code with the repositories attached, and a cloud environment that can reach your package registries.
Set it up
- Create the routine at claude.ai/code: Routines → New. Attach the repositories, pick the environment, and paste the prompt.
deploys autofix promptprints it, and the app has a button that copies it. - Add an API trigger in the routine: Trigger → + → API → Generate token. The token is shown once.
- Give both to Deploy Center, in Settings → Autofix or in the terminal:
pbpaste | deploys autofix set-token # token goes to the keychain
deploys autofix routine trig_XXXXXXXX
- Try it without firing anything:
deploys autofix --dry-run
- Run it every 10 minutes (installs a launchd job;
offremoves it):
deploys autofix schedule on
deploys autofix list shows every hand-over with its session link. The full reference is in docs/AUTOFIX.md.
What it does and does not do
- Fires for Vercel production deploys in
ERRORand Render deploys inbuild_failed. Render runtime and health-check failures are only reported, because the build log does not show their cause. - Never merges, never deploys. A person merges; you start the deploy.
- Rate limits: 2 hand-overs per project and 6 per account in 24 hours. No duplicates, and no new hand-over while a fix PR for that project is open.
- One attempt per fix. If the fix fails too, you get a notification instead of another round.
- Secrets are masked in the log when recognized. Masking is a help, not a guarantee: if your build logs may print secrets, do not use Autofix.
Honest limits
- The cloud session does not have your platform's environment variables, so a build can pass there and still fail on Vercel. Expect some PRs that do not fix the deploy.
- Causes outside the code, such as a missing secret, an expired key or a platform outage, cannot be fixed in a PR. Claude reports the cause instead.
- Detection runs while your Mac is awake. Every hand-over uses one routine run, including the ones that end in “nothing to fix in code”.
- The routines API is a research preview and may change.
Without Autofix: Copy for Claude
For a single failure, open the build log in Deploy Center and click Copy for Claude. It copies the project, commit and error lines as a fix request to paste into Claude Code.
Questions
How do I fix a failed Vercel build with AI?
Give the agent the error lines from the build log and the commit. Deploy Center does this for you: Copy for Claude for one failure, or Autofix, which hands every failed build to a Claude Code routine that opens a fix PR.
Does Autofix merge or deploy by itself?
No. It opens a pull request. A person merges it, and you deploy the fix with one click.
Is my build log sent anywhere?
Only to your own Claude Code routine, with recognized secrets masked. Deploy Center has no server of its own.
Does it work for Render?
Yes, for Render deploys that fail in the build. Runtime and health-check failures are reported but not handed over.
Do it for every project in one click.
Deploy Center is a free, open-source Mac app. It turns off auto-deploy on Vercel, Render, Netlify, Cloudflare Pages and more, shows the commits and PRs waiting to go live, and deploys what changed when you decide.