Skip to main content
When a CI check fails on a Twill-created pull request, the agent automatically investigates and pushes a fix.
CI fix workflow showing agent detecting and fixing a failed check

How It Works

  1. GitHub sends a webhook when a check run completes with a failure
  2. Twill identifies the task by matching the branch name to an active task
  3. Agent reads the CI logs, identifies the cause, and pushes a fix
  4. CI runs again on the new commit
The agent posts a comment on the PR when it starts investigating:
🔧 CI check build failed. I’m investigating the issue and will push a fix shortly. (Attempt 1/3)

Loop Prevention

To avoid infinite fix loops, Twill limits itself to 3 fix attempts per CI failure. The counter resets after 24 hours. If the agent can’t fix the issue after 3 attempts, it stops and leaves the PR for human review.

Requirements

Auto Fix CI only triggers for:
  • Pull requests created by Twill’s bot
  • Tasks that are still in progress (not completed or cancelled)
  • Check runs that completed with a failure conclusion