Find why a deploy failed

The error from the build log, the change that caused it and a suggested fix, sent when a deploy fails.

  • On an event: When a deploy fails in Vercel

What it does

The task

Check the Vercel project project for deploys that failed since the last run. Open the build log of each one and find the first error. Open the commit on GitHub and compare it with the commit of the last successful deploy. Find the change that most likely caused the error. Send me the error lines, the commit, the changed files and a suggested fix of at most 5 lines. Do not deploy again and do not roll back.

  • It works in Vercel and GitHub, in the workspace you pick, and signs in with passwords from your Cuiar vault.
  • A routine checks every 15 minutes and acts on what is new: when a deploy fails in Vercel.

What you give it

BlankWhat to giveExample
projectThe Vercel project namebrightleaf-web

What you get back

An example run with the example values above. Your run uses your own data.

Deploy failed: brightleaf-web, preview for the branch feat/xlsx-export, 4 Nov 16:05

Error, build log line 212:

Type error: Property 'sheetName' does not exist on type 'ExportOptions'. src/export/xlsx.ts:41:17

Commit: 7c19ab2 "Add XLSX export" by Aisha

Changed since the last good deploy: src/export/xlsx.ts, src/export/types.ts

Cause: types.ts renames sheetName to sheet, but xlsx.ts still uses the old name.

Fix: in src/export/xlsx.ts, line 41, change options.sheetName to options.sheet.

Run it in Cuiar

  1. 01

    Open it

    Click Use in Cuiar on this page. The side panel opens with the task in the composer.

  2. 02

    Fill in the blank

    Type project. Tab moves to the next blank.

  3. 03

    Run it, then repeat it

    Run sends it once. To run it when a deploy fails in Vercel, make a routine on cuiar.com/routines or with the CLI below.

As a routine, from the terminal

cuiar routines create "Find why a deploy failed" --schedule "*/15 * * * *" --time-zone Europe/Berlin \
  "Check the Vercel project brightleaf-web for deploys that failed since the last run. Open the build log of each one and find the first error. Open the commit on GitHub and compare it with the commit of the last successful deploy. Find the change that most likely caused the error. Send me the error lines, the commit, the changed files and a suggested fix of at most 5 lines. Do not deploy again and do not roll back."

Run it from your AI agent

Claude Code, Codex, Cursor and other MCP clients reach Cuiar at https://mcp.cuiar.com/mcp. Add the server one time, then ask for the task in plain words, or call create_routine yourself.

1. Add Cuiar to Claude Code

claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp

2. Ask your agent

Use the Cuiar tool create_routine to run my "Find why a deploy failed" template with project = brightleaf-web.

Setup for other agents: AI agents.

The tool call

{
  "name": "create_routine",
  "arguments": {
    "name": "Find why a deploy failed",
    "task": "Check the Vercel project brightleaf-web for deploys that failed since the last run. Open the build log of each one and find the first error. Open the commit on GitHub and compare it with the commit of the last successful deploy. Find the change that most likely caused the error. Send me the error lines, the commit, the changed files and a suggested fix of at most 5 lines. Do not deploy again and do not roll back.",
    "schedule": "*/15 * * * *",
    "time_zone": "Europe/Berlin"
  }
}
All engineering templates