cursor

An error-fixing protocol that watches an AI agent’s repair attempts and detects when it keeps trying similar fixes. It responds with increasingly urgent prompts to change approach.

In plain words
What is it for?
Use it during coding error fixes to monitor repeated attempts, compare their similarity, and suggest ways to step back or try a different direction.
Why use it?
AI agents can repeat small variations of a failed fix because earlier attempts are difficult to track. This helps identify that pattern before more time, tokens, or code changes are wasted.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/synthet1cc/unloop-mcp/cursor
Clone the repo
git clone --depth 1 https://github.com/synthet1cc/unloop-mcp
Per session 8,249 This file is loaded in full into every session.
When invoked 8,249 The same file — it is already loaded in full.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.08249 $0.08249
Opus 5 $0.04124 $0.04124
Sonnet 5 $0.01650 $0.01650
Haiku 4.5 $0.00825 $0.00825

Measured 2d ago against content hash 001bda661216, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

cursor scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Run: rm -rf node_modules && npm install
rules/cursor.mdc · 806 lines

How it starts

The opening of the file, as written. The whole thing — 806 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unloop — AI Fix Loop Detection & Recovery Protocol

What is Unloop and why it exists

Unloop is an MCP server running alongside your coding session. It solves a specific, well-documented problem: you (the AI) get stuck in fix loops. You encounter an error, try to fix it, the fix doesn't work, and you try a slightly different variation of the same approach — 5, 10, 20 times — without ever stepping back to reconsider. This wastes the user's time, burns their tokens, and often makes the codebase worse with accumulated bad changes.

You can't detect this yourself because:

  • You have no structured memory of what you've already tried
  • You're biased toward incremental variations of your last attempt
  • Earlier attempts scroll out of your context window after enough messages
  • You have no meta-reasoning system that says "you're going in circles"

Unloop provides that meta-reasoning. It tracks every fix attempt, fingerprints the errors, measures the similarity between your approaches, and tells you — with increasing urgency — when you need to stop and change direction.

This protocol is not optional. It is mandatory whenever you are fixing errors.


How the system works (so you understand WHY each rule matters)

Error fingerprinting

Every error message you report is normalized: file paths, line numbers, UUIDs, timestamps, hex hashes, ANSI codes, and stack frames are stripped out. The result is hashed into a stable fingerprint. This means "Cannot find module './Button' in /Users/alice/src/App.tsx:42" and "Cannot find module './Button' in /Users/bob/src/Main.tsx:7" produce the same fingerprint — they're structurally identical errors.

Fix similarity detection

Your fix_description is tokenized (lowercased, stop-words removed) and compared against every previous fix description for the same error fingerprint using Jaccard similarity. If two descriptions share more than 55% of their meaningful words, they're considered "the same approach." This is how Unloop detects that you're making minor variations instead of genuinely different attempts.

Read the full file on GitHub · 806 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 806 lines · 8,249 tokens per session scan C 001bda661216

Subscribe to this mod's changes

cursor is a cursor rule published in the GitHub repository synthet1cc/unloop-mcp (4 stars, last pushed 5mo ago), licensed MIT. It adds 8,249 tokens to every session, about $0.0412 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.