Home › Browse

Fix a failing build: how to do it with AI

Last checked 2026-10-15

AdvancedBot with human review 💻 Coding

Agent reads errors, edits code and re-runs until green.

1. Bot automation level

Bot with human review Agents act on real systems; review plans, approvals and results before trusting them.

2. Before you hand it to the bot

3. Copy-paste prompts

Main prompt
CI is failing on main (log below). Reproduce it, explain the root cause, then make the minimal fix on a new branch, re-run the tests and open a PR. Do not disable or skip tests.

<log>
Beginner-friendly
CI is failing on main (log below). Reproduce it, explain the root cause, then make the minimal fix on a new branch, re-run the tests and open a PR. Do not disable or skip tests.

<log>

I'm new to this: explain each step in plain words and ask me for anything you need before starting.
Check-your-work
CI is failing on main (log below). Reproduce it, explain the root cause, then make the minimal fix on a new branch, re-run the tests and open a PR. Do not disable or skip tests.

<log>

When you finish, list any assumptions you made, anything you're unsure about, and what I should double-check before using the result.

Free tiers that can handle this (verified): GitHub Copilot, ChatGPT (incl. Work & Codex). Others: check plan.

4. Step-by-step

  1. Copy the failing CI log URL or output.
  2. Give a cloud/IDE agent repo access (Copilot cloud agent via an issue, Cursor Cloud Agent, Claude Code, Codex cloud).
  3. Ask it to reproduce the failure locally first and explain the root cause before editing.
  4. Let it make the smallest fix on a new branch and re-run the failing job/tests.
  5. Review the diff yourself; check it didn't skip or delete tests.
  6. Merge only after CI passes and a human approves.

5. Which bots and plans can do it

ToolWhat's different herePlan limitsSource
CursorCloud Agents run in isolated VMs and can attach logs/screenshots to the PR.Pricing page unverified; cloud agents require a connected source-control repo.cursor.com/docs/agent/overview
GitHub CopilotCloud agent runs in a GitHub Actions environment: one repo, one branch, one PR per task.Free: 2,000 completions + 50 chats; cloud agent listed on paid plans.docs.github.com/en/copilot/concepts/agents/cloud-agent/about-cloud-agent
Claude (incl. Claude Code)Claude Code also runs in GitHub Actions/GitLab CI.Claude Code and Research need Pro or higher; computer use is Pro/Max only (research preview).code.claude.com/docs/en/desktop
ChatGPT (incl. Work & Codex)Codex can work in cloud environments and review PRs.Free tier has limited deep research, Codex and Work; scheduled tasks need Go or higher (per chatgpt.com/pricing).help.openai.com/en/articles/20001275-chatgpt-work-and-codex

Free or paid?

6. Risks and what to double-check

Professions that use this

Software developer · DevOps / SRE engineer

Related tasks

Open in the interactive app