break-ai-fix-loops
Lets your agent break out of ineffective code-fixing loops. It uses methods to identify failures and ensure fixes are effective.
What it does
This tool helps stop the 'trial and error' cycle when a computer program (AI) tries to fix an error but keeps failing in the same way. It ensures fixes are reliably verified and limits the number of attempts.
When to use it
- ✓When the AI keeps repeating the same fixes without solving the problem.
- ✓When a simple test passes, but the program still fails in real use.
- ✓When you need to be sure a fix actually worked and can revert if it didn't.
Example of what to ask your AI
“The AI is stuck in a loop trying to fix this bug, can you use 'Break AI Fix Loops' to ensure fixes are properly verified?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It works by recording exact details of the problem and what should happen. Each fix attempt is limited and checked against concrete evidence, ensuring the fix is real and not just a repeat.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill break-ai-fix-loopsOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/break-ai-fix-loops/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Break AI Fix Loops
Replace patch-and-retry behavior with a bounded, evidence-producing repair. Treat a changed patch as progress only when an observable state changes.
When to Use This Skill
- Use when an AI coding agent cycles through similar patches without changing the observed failure.
- Use when a focused test passes but the installed, deployed, UI, API, persistence, or other real execution path still fails.
- Use when a repair claim needs a verifier that can reject a known-bad state and a rollback that has actually restored the baseline on a disposable copy.
- Do not use for a one-shot, already-understood edit whose acceptance check directly exercises the complete claimed behavior.
Establish the repair contract
Before the first edit, record:
- the exact defect and the behavior that would disprove it;
- the revision, configuration, input, and execution path under test;
- the baseline command, literal result, and exit status;
- the strongest check that directly observes the claimed behavior;
- the rollback command and the state it must restore.
Save raw evidence before normalizing it. Redact credentials, tokens, cookies, personal data, and private URLs. Never put secrets into a fingerprint record or committed ledger.
If the defect cannot be reproduced, stop editing. Report INCONCLUSIVE with the missing observation instead of guessing at a fix.
Use a three-attempt budget
Allow at most three repair attempts for one acceptance claim. An attempt begins when code, configuration, dependencies, generated artifacts, or test expectations change. Inspections and read-only probes do not consume an attempt.
Do not reset the budget because the agent restarts, opens a new session, rewrites the same patch, changes models, clears a cache, or renames the hypothesis. A newly exposed downstream failure still belongs to the same three-attempt budget unless it is a separately accepted task.
For every attempt, write these fields before the next edit:
| Field | Required evidence |
|---|---|
| Hypothesis | One causal mechanism, not a restatement of the symptom |
| Prediction | An observation that would distinguish this hypothesis from the previous one |
| Change | Exact changed paths and a patch or before/after hash |
| Focused check | Exact command, input, literal output, and exit status |
| Real-path check | Direct observation, or NOT_RUN with a reason |
| Symptom fingerprint | Stable fingerprint described below |
| Decision | ADVANCE, SHIFT_CAUSE, PROVEN, or STOP |
Use the evidence ledger as a copyable record.
Fingerprint the observable failure
Fingerprint what the system did, not the agent's explanation. Build a canonical record from:
{
"schema_version": 1,
"command": "the exact verification command",
"input_digest": "digest or stable identifier of the tested input",
"exit_code": 1,
"failure_class": "stable-machine-readable-class",
"stable_excerpt": "the smallest decisive output with volatile values removed",
"real_path_state": "the directly observed state, or NOT_OBSERVED"
}
Keep the unedited output beside this sanitized record. Remove timestamps, run IDs, ANSI codes, random ports, and temporary paths from stable_excerpt only when they do not affect the defect. Do not normalize away values that could distinguish two causes.
Optionally compute the canonical SHA-256 fingerprint from this skill directory:
python3 scripts/fingerprint.py evidence/attempt-1.json
The helper validates the record, rejects unknown fields, and prints the fingerprint. It does not execute commands or redact evidence.
The helper uses only the Python 3.9+ standard library. When changing it, run its bundled regression tests:
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest scripts/test_fingerprint.py -v
The same fingerprint after a different patch means the observable failure did not move. A cosmetically different message with the same failure class, input, command, and real-path state also counts as a repeated failure when the changed text is only volatile data. Do not use a patch hash in the symptom fingerprint; record it separately so different edits cannot masquerade as different outcomes.
Shift the root-cause strategy
Set the decision to SHIFT_CAUSE immediately when any of these occurs:
- a symptom fingerprint repeats;
- the patch changes but the decisive state does not;
…
FAQ
What is a 'fix loop'?
It's when a computer program (AI) tries to fix a bug, but the fix doesn't work, and it tries again, repeating the same process unsuccessfully.
What does 'evidence' mean here?
It's the detailed records of what happened: the exact error, the steps to reproduce it, the expected outcome, and the actual outcome, like proof.
Why limit attempts?
Limiting attempts prevents the AI from spending endless time on fixes that don't work, forcing a more methodical, evidence-based approach to problem-solving.
Details
Original description by the author
Stop ineffective AI coding repair loops with stable failure fingerprints, a three-attempt budget, real-path proof, negative controls, and tested rollback.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2440
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
cpp-testing
Makes your agent write and improve tests for C++ code. It helps set up testing tools and fix errors.
affaan-m/ECC
csharp-testing
Helps your agent create tests for C# and .NET code. It uses best practices to ensure tests are efficient and reliable.
affaan-m/ECC
django-tdd
Enables your agent to apply testing strategies for Django with pytest-django and TDD. It's useful for writing robust tests and ensuring code quality, especially for DRF APIs.
affaan-m/ECC