Before this feature existed, I built a separate app of my own just to make an AI run when I wanted it to. The app worked by pushing a prompt into the prompt box for me.

Since /loop arrived in Claude Code, I rarely use that app anymore. General-purpose tools catch up fast.

/loop is a genuinely good feature when you use it well. In a word, it's the command that wakes an AI.

An AI can't wake itself

It starts from a simple fact. An AI acts only when input comes in. Ask it nothing and it answers nothing; tell it to do nothing and it sits still. There's no clock inside it that turns itself on.

As I covered in the piece on /goal, an AI stops the moment things "look done." It's good at stopping. The problem is what comes next — a stopped AI can't get back up on its own. Someone has to wake it.

/loop does that "waking" for you. At the interval you set, it pushes the same instruction back in — an alarm that taps a sleeping AI awake.

How I use it

What /loop does comes down to one thing — it doesn't run once and finish; it keeps re-issuing the same instruction on a schedule until you stop it. There are two ways to use it, depending on what that instruction is. You either keep watching, or you keep doing. The command is /loop, followed by an interval and the instruction.

Keep watching — it checks each time, and tells you when something changes.

Watch for news. When you want to keep an eye out, off and on while you work, for anything new on a topic you care about.

/loop 30m search (a specific site, etc.) for new "AI regulation" news, and if there is any, give me just the headline and a one-line summary. If there's nothing, just say "no news".

Check whether a long job finished. Exports, uploads, renders — things where you wait a while for a result.

/loop 5m check whether a new file or a done marker has shown up in this folder, and tell me if it has: [folder]

If the thing you're waiting on happens once, eventually, just add "ping me once when it happens, then stop" to the end. It tells you once when it happens, then stops on its own.

Keep doing — not checking, but actually doing the work each time. Processing, or making.

Handle a steady stream as it comes. When new material keeps piling up and you'd rather not batch it all at once.

/loop 10m sort the new files that have come into this folder by type, and tell me what you sorted in just one line: [folder]

Produce them one at a time, on a schedule. When you'd rather build up slowly than crank them all out at once.

/loop 30m write one more short copy candidate on this topic and add it to the notes: [topic]

Either way, there's no built-in end. It keeps going until you tell it to stop — that's why it's /loop.

The interval — set it, or leave it to the AI

Write an interval and it wakes on exactly that. /loop 10m … means every 10 minutes. You can also just say "every 10 minutes."

Leave the interval out and the AI sets it itself, as in /loop track the status of that job. And if you tell it to adjust the interval as the situation changes, it will vary the interval while it tracks. That said, how this adjustment works differs by runtime environment.

For a job that checks the same thing on a fixed interval, give it an interval; for a job that shifts with the situation, explain the context and leave it to the AI.

Turning it off, and what to know

Turning it off isn't hard. The easiest way is to just say "turn off that loop" — Claude cancels it for you.

You can also write a stop-when condition up front, and it ends once that condition is met.

Or you can just leave it. The docs say a recurring task expires seven days after it's created — it fires one final time, then deletes itself. I haven't actually watched one all the way to seven days, though, so I can't say for sure.

And one thing to know — /loop runs while that conversation is open. Step away, and as long as the session is alive it keeps running in the background. But closing Claude Code or shutting down the computer turns it off. (That's why, if you try to quit with /exit, it asks "Really end the background tasks?")

When not to use it

Stopping and waking

/goal is how you make an AI work to the end and stop; /loop is how you wake a stopped AI.
Combine just these two well and you can automate repetitive work.
So what can you do with the pair?
In the next piece, I'll get into some fun automation tips I've tried myself.

That was /loop — a fun feature for waking an AI.

Sources