Fix a failing CI job from the logs
Cursor reads a failing CI log, proposes the smallest code change that addresses the real error, and gives you the command to verify locally.
A minimal diff plus one verification command you can run before you push again.
- 1
Paste the failing step, not the whole run
Include from the first error through the final exit code. Earlier green steps hide the signal.
- 2
Run the verification command locally
The case ends when the same command passes on your machine. Do not push on faith.
- 3
Re-read the diff for scope creep
If the fix touches files the log never mentioned, split unrelated edits into another commit.
The prompt to paste
This CI job failed. I want the smallest fix that makes it pass, not a refactor. Failed job: [name and link if you have it] Log paste: [paste the failing section — include the first error line and the stack or test name] Repository context: [branch, what you changed in the last commit if you know] Do: 1. State the root cause in one sentence, citing the exact log line. 2. Propose the minimal code change. Show a diff or file edits only where needed. 3. Give the exact command to reproduce the failure locally (test file, lint, or build). 4. List anything you did not fix because it was unrelated red in the log. Rules: - Do not upgrade dependencies unless the log proves a version conflict. - Do not disable tests or widen eslint rules to green the job. - If the log is truncated or ambiguous, say what to paste next instead of guessing.
A flaky job can pass on retry without a code change. If the log looks like timeout or network, confirm before you merge a fake fix.
Sample case written by Hidden Logic Lab. Not affiliated with Cursor.
More in Coding
Get new cases in your inbox
Weekly notes on new use cases and agent workflows. No product pitches.