# Loop Breaker

> Use when stuck in a loop, going in circles, repeating the same failing approach, seeing the same error after multiple retries, or making no progress despite multiple attempts. Detects infinite retry cycles and forces strategy pivots before burning tokens.

- Skill: `owen-dev-6174/loop-breaker` (Agent Skill)
- Install (CLI): `npx skillmds@latest add owen-dev-6174/loop-breaker`
- Raw SKILL.md: https://api.skillmd.com/api/skills/owen-dev-6174/loop-breaker/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: owen-dev-6174 (https://skillmd.com/u/owen-dev-6174)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/owen-dev-6174/loop-breaker

---


# Loop Breaker: Stop Repeating, Start Solving

Agents waste enormous effort looping through the same failing approach -- retrying identical strategies, seeing the same error, going in circles 10, 20, even 58 times. This skill breaks the cycle.

## The Iron Law

> **The third identical attempt is always wrong.** If you've tried something twice and it failed, doing it a third time is not persistence -- it is insanity.

## The Process

After every failed attempt, check: **have I tried this before?**

```dot
digraph loop_breaker {
    rankdir=TB
    node [shape=box style=rounded]

    attempt [label="Attempt fails"]
    check [label="Have I tried this\napproach before?" shape=diamond]
    first [label="Log approach +\nerror in tried list.\nRetry ONCE with\ntargeted adjustment."]
    second [label="STOP. 2 failures\nwith same approach.\nTrigger pivot protocol."]
    list [label="1. List all tried approaches\n2. State WHY each failed\n3. Generate 3 fundamentally\n   different strategies\n4. Pick most promising\n   untried approach"]
    pivots [label="Have I pivoted\n3 times with\nno progress?" shape=diamond]
    escalate [label="STOP. Escalate\nto the user.\nPresent findings."]
    execute [label="Execute new\napproach"]

    attempt -> check
    check -> first [label="No / once"]
    check -> second [label="Yes, twice+"]
    second -> list
    first -> attempt [label="fails again" style=dashed]
    list -> pivots
    pivots -> escalate [label="Yes"]
    pivots -> execute [label="No"]
    execute -> attempt [label="fails" style=dashed]
}
```

### Step 1: Track what you have tried

Maintain a mental ledger after each failure:

- **Approach**: What you did (specific file, function, strategy)
- **Result**: The exact error or failure mode
- **Root cause**: WHY it failed, not just THAT it failed

### Step 2: Detect the loop (2-strike rule)

If the same approach has failed twice (same file, same strategy, same class of error), you are in a loop. Stop immediately. Do not attempt a third time.

### Step 3: Force a pivot

When the 2-strike rule triggers:

1. **List** every approach tried and its failure reason
2. **Diagnose** the common thread -- why does this category of fix keep failing?
3. **Generate 3 fundamentally different strategies** -- not variations, genuinely different angles (different files, different tools, different assumptions)
4. **Select** the most promising untried strategy and execute it

### Step 4: Escalate after 3 failed pivots

If you have pivoted to 3 genuinely different strategies and none produced progress, stop and escalate to the user. Present:

- What was tried (all approaches)
- Why each failed
- What you suspect the root cause is
- What information or access you need to proceed

## Red Flags: Rationalizations That Signal a Loop

| You catch yourself thinking | What it actually means |
|---|---|
| "Let me try one more time" | You already tried. Pivot now. |
| "Maybe I just need to adjust slightly" | A slight adjustment is the same approach. |
| "It should work this time" | Evidence says otherwise. New strategy needed. |
| "Let me re-read the error" | You have read it. The error is not wrong -- your approach is. |
| "This is the only way to do it" | There is always another way. You are stuck, not correct. |
| "I just need to change one small thing" | If the strategy is wrong, small changes will not fix it. |

## What Counts as "the Same Approach"

Two attempts are the same approach if they share **any** of these:

- Editing the same lines in the same file with minor variations
- Applying the same category of fix (e.g., adding imports, adjusting types)
- Getting the same error message or same class of error
- Operating on the same assumption about root cause

A **fundamentally different** approach means changing your assumption about what is wrong, not just how you fix it.

