Aider repeats lint fixes? Inspect the failing check before another edit.

When the same lint or test failure returns after successive edits, preserve each diff and identify whether the check is failing for code, configuration, or environment reasons.

Do this first: Pause the automatic edit/check cycle after one repeated result. Save the exact linter command, output, exit code, and before/after diff; do not disable every quality check as a blanket workaround.

What the failure looks like.

Aider edits a file, runs a lint or test command, then receives the same failing result and makes another change without producing a new verification result.

Why it happens.

A repeated linter message can reflect an unchanged code defect, a misconfigured check, or an unrelated environment failure. The cited Aider reports are examples, not evidence that one cause explains all loops.

Fix it without losing the task.

Record the check command, complete output, exit code, and whether the same diagnostic appears on each cycle.
Compare diffs in order. Identify the first edit that repeats or reverses a previous change.
Run the check independently only if it is safe and deterministic. If it fails without Aider, inspect the check configuration or environment before asking for another code edit.
Resume with one targeted correction and a stated passing condition. Keep the lint/test enabled unless evidence shows the check itself is misconfigured.

What the next AI should receive.

Aider version and model, exact lint/test command, full diagnostic and exit code, files edited across each cycle, the first diff that stopped converging, and the one check required to accept a fix.

First safe action

Stop after the same diagnostic repeats. Run the exact check once yourself if safe, then compare its output and the changed lines with Aiders last attempt.

Evidence boundary

Issues #1090 and #3614 are individual reports. They do not establish how often lint loops occur or make disabling lint the correct fix for other projects.

Diagnostic checkpoint

If repetition is caused by a linter cycle, use this page. For an open-ended loop without a recurring lint/test result, see the broader Aider loop guide.

How ShardStitch helps.

ShardStitch can preserve the failing output, diff, files changed, and attempts already made so a fresh session does not repeat them. It does not inspect the linter configuration or fix the underlying code.

Source trail.

Aider issue #1090, issue #3614, and Aider usage documentation.

FAQ.

Should I turn off linting to stop Aider from looping?

Not by default. First establish whether the check is reporting a real code problem or a configuration/environment failure. If you temporarily disable a check, document that it remains unverified and restore it for final validation.

How is a lint loop different from Aider looping indefinitely?

This page is specifically about repeated edits driven by the same lint or test result. The broader loop guide covers non-lint repetition and open-ended tasks without that recurring check.

Scope note: This guide is limited to repeated Aider edits after lint or test feedback. The linked issues are reports, not prevalence data or a universal explanation.