# A 15-line skill that stops Claude Code agents from burning your quota in loops

> Source: <https://dev.to/plainskillszero/a-15-line-skill-that-stops-claude-code-agents-from-burning-your-quota-in-loops-2ofo>
> Published: 2026-10-29 18:01:11+00:00

If you let a Claude Code agent run unattended, you have probably seen it: the same failing command, retried five times, each retry eating tokens. Or a "sweep" that keeps re-checking a file that has not changed. The expensive part is not the work, it is the work that goes nowhere.

We run several Claude Code sessions every day on one project, and the cheapest fix we found was not a bigger limit. It was two habits, written down once as a skill:

Before launching a subagent or a repeating task, write four things:

Stop and rethink, rather than raising the limit or retrying the same way, if:

And when the result comes back: at most three follow-up rounds, each with a reason. On the third, close it as **applied** or **discarded**. Nothing stays in limbo.

That is the whole thing. It fits in a plain-text `SKILL.md` you can read in thirty seconds and drop in your skills folder:

```
---
name: loop-stop
description: "Brief a long-running agent or loop properly and know when to stop it. Use when launching or watching a subagent, a sweep or any repeating task."
---
```

The full file, with a short "why it exists" note, is free to use and copy for your own work: [https://github.com/happy-program-zero/loop-stop](https://github.com/happy-program-zero/loop-stop)

If you want the rest of what we use (cross-checking a "done" by another route, a quota budget before long jobs, a daily hand-off report, file-based memory between sessions), there is a paid pack of seven skills: [https://plainskills.gumroad.com/l/multi-ai-pack-complete](https://plainskills.gumroad.com/l/multi-ai-pack-complete). It is optional; the free one stands on its own.

What stop rules do you use for your own agents? I would like to hear which ones we are missing.
