Autofix CI Failures

Trunk can return targeted information about CI failures, enabling AI agents and automation tools to analyze and fix issues automatically.

Prerequisites

To use the Autofix CI Failures feature, you'll need to have:

Cursor CI Autofix

You can set up a Cursor Automationarrow-up-right to automatically fix CI failures by connecting to Trunk's CI failure investigation data via MCP. This is an extension of the Cursor CI Autofix template.

Configuration for Cursor Automation

Set up the Trunk MCP using Bearer Authentication.

We recommend the following conventions:

  • Version your Automation names for more clarity (e.g., "CI Autofix v1")

  • Refine the prompt to avoid scanning GitHub logs in order to save time and tokens

  • Be specific about your repository's conventions and common failure patterns

circle-info

Currently Cursor will create a pull request with a base of main. You will need to adjust the pull request base if you want to merge the fix into your PR.

Claude Code Routines

circle-info

Coming soon. Set up Claude Routines to autofix CI failures

Last updated

Was this helpful?