Skip to main content
Self-healing CI is in beta. It runs on Peak’s own repositories only.
When a pull request’s job fails on a Peak runner, Peak finds the cause. If the pull request’s code caused it, Peak fixes it, re-runs the failing command, and pushes one small commit to the pull request branch. Peak repeats until CI is green.

Before you start

  • Sign in to Peak as an Admin.
  • Run the pull request’s jobs on Peak runners.

Turn it on

  1. Open Self-healing CI.
  2. Choose Turn on.
  3. Choose All repositories, or Choose repositories and check each one.
  4. Choose Turn on.
Expect Auto-push on each repository you chose. Expect no new GitHub permission and no new install.

Choose a mode

Set Mode beside each repository.

Check what Peak changes

Peak pushes a fix only when all of these are true.
  • The failing command failed before the fix and passed after it, in an isolated VM at the same commit.
  • The fix changes the code the pull request touched, or a file named in the failure.
  • The fix changes at most 10 files and 300 lines.
  • The pull request is open, comes from the same repository, and still has the commit that failed.
Peak never does these.
  • Write to the default branch.
  • Force-push, rebase, or merge.
  • Touch pull requests from forks.
  • Change CI definitions, such as workflow files.
  • Change lint, type, or test settings.
  • Delete or skip tests, or weaken an assertion.
  • Add sleeps, retries, or longer timeouts.
  • Add lint or type suppressions.
  • Hide errors, such as with an empty catch.
  • Change environment or credential files, or binary files.
Peak suggests these instead of pushing them.
  • A change to an expected value in a test
  • A snapshot update
  • A dependency pin or downgrade
  • A change that undoes part of your pull request

Read the pull request comment

Expect one Peak comment on the pull request. Peak edits it as it works. Peak re-runs a flaky job once. Peak never changes code for a flaky test.

Recognize Peak’s commits

Each Peak commit is by peak-runners[bot], signed by GitHub, and ends with a Peak-Autofix: line. Branches that require signed commits accept it.

Pull before you push

A Peak commit puts the pull request branch ahead of your copy. Pull before your next push.

Revert a fix

Revert the commit like any other.
Expect Peak never to push that fix to that pull request again.

Stop Peak on a pull request

Add this label to the pull request.
Expect no new Peak commits on that pull request.

Apply a suggested fix

  1. Open the pull request comment.
  2. Under Suggested, not pushed, choose Apply.
  3. Check the patch.
  4. Choose Apply.
You need push access to the repository on GitHub. Peak checks it with your own GitHub sign-in. If Peak asks, choose Connect GitHub, then open the link again. Peak then pushes the fix to the pull request branch.

Check the limits

Check fixes pushed, fixes kept at merge, time saved, and cost for the last 30 days on Self-healing CI.

Use the API and MCP server

Send a mode to set it: auto, suggest, or off.
Agents connected to the MCP server get these read-only tools.