Engineering

Fix a failed Vercel preview build

Mention Merlin on a pull request whose Vercel preview failed to build. It reads the build logs through Vercel, fixes the build in your code and pushes to the branch.

@Merlin from now on, when someone asks you about a failed Vercel preview on a pull request, read that deployment's build logs through Vercel, find the cause in the checkout and push the smallest fix to the same branch. Reply with the cause and what you changed. Don't redeploy or change anything in Vercel: the push starts a new preview.

acme/web · pull requests
Get started for free
  1. Starts whenSomeone mentions @usemerlin-ai on a pull request whose Vercel preview failed to build
  2. Merlin worksClaude Code or Codex reads the preview's build logs through Vercel and fixes the build in the checkout on a teammate's machine
  3. You getA fix pushed to the branch, with a reply that explains the cause

Tools

  • GitHub
  • Vercel

Capabilities

  • Integrations
  • Your agent's MCP

How it works

From a failed preview to a fixed build.

Mention @usemerlin-ai on a pull request whose Vercel preview failed to build.

acme/web

Type/to searchL
CodeIssues8Pull requests12AgentsActionsProjectsSecurityInsightsSettings

Add the usage chart to the billing page#533Code

Openleewants to merge 3 commits intomainfromfeat/usage-chart

Conversation 5 Commits 3 Checks 3 Files changed 3+48−6

Some checks were not successful

VercelFailing after 3m

Before and after

A red preview stops blocking review.

Without Merlin

The author leaves their work to dig through Vercel's build log, then works out why it builds on their machine and not there.

  1. 01Open the failed Vercel check
  2. 02Find the preview deployment
  3. 03Scroll the build log
  4. 04Pull the branch
  5. 05Run the build locally
  6. 06Compare the import with the file
  7. 07Fix the import's casing
  8. 08Push the fix
  9. 09Wait for the new preview

With Merlin

One mention gets the build fixed while the author keeps working.

  1. @usemerlin-ai under the failed previewAsked by the author on GitHub
  2. Reads the build log on Lee's MacBookVercel's logs, then the checkout
  3. Fix pushed to the branchThe push starts a new preview

Setup

Connect GitHub and give your agent Vercel.

Set these up once and anyone can hand a failed preview to Merlin from the pull request. Merlin only reads Vercel: fixes reach it through a push.

  1. 01Connect a machineRuntimeInstall the Merlin desktop app or CLI on a computer running Claude Code or Codex. You can also use a machine a teammate shares with your workspace.
  2. 02Install the GitHub appIntegrationsPick the repositories Merlin can access. It sees mentions, reads the pull request and replies in the thread. Pushes use the machine owner's own Git access.
  3. 03Add Vercel to your agentYour agent's MCPConnect the Vercel MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
  4. 04Grant the team that owns the projectYour agent's MCP

    When you sign in to Vercel MCP, grant the connection access to the team that owns the project (team access). Without it, Merlin can't read that project's deployments or build logs.

  5. 05Paste the setup promptGuidanceAn owner or admin sends the prompt below to @Merlin once, and it becomes workspace guidance for every future run.

Prompt

Tell Merlin how to fix a failed preview.

@Merlin from now on, when someone asks you about a failed Vercel preview on a pull request, read that deployment's build logs through Vercel, find the cause in the checkout and push the smallest fix to the same branch. Reply with the cause and what you changed. Don't redeploy or change anything in Vercel: the push starts a new preview.

acme/web · pull requests

Once, when you paste it

  1. PromptYou paste the prompt to @Merlin
  2. GuidanceMerlin saves your rules as workspace guidance

Every time someone mentions Merlin on GitHub

  1. IntegrationThe GitHub app spots the mention
  2. RuntimeMerlin picks an available machine
  3. ContextThe run gathers context
  4. WorkClaude Code or Codex reads the build log and fixes the code
  5. SteeringYour team steers the work in the thread
  6. ResultMerlin pushes the fix and replies

Bring your coding agents into the tools your team already uses.

Let your whole team hand work to Claude Code and Codex today. Connect one machine and add Merlin to Slack, Linear or GitHub. 14-day free trial, no API keys, no card.