Trunk can return targeted information about CI failures, enabling AI agents and automation tools to analyze and fix issues automatically.Documentation Index
Fetch the complete documentation index at: https://trunk-4cab4936-mintlify-sync-from-docs-1778014214.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
To use the Autofix CI Failures feature, you’ll need to have:- Your repository set up to upload test results to Trunk
Cursor CI Autofix
You can set up a Cursor Automation to automatically fix CI failures by connecting to Trunk’s CI failure investigation data via MCP. This is an extension of the CursorCI Autofix template.
Set up the Trunk MCP using Bearer Authentication.
Recommended Cursor Automation Prompt
Recommended Cursor Automation Prompt
- 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
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
Coming soon. Set up Claude Routines to autofix CI failures