---
title: "Claude Code /loop: How It Paces Itself and When It Stops"
date: "2026-10-15"
video_id: "7696957155513044238"
tiktok_url: "https://www.tiktok.com/@itsjakethewizard/video/7696957155513044238"
creator: "@itsjakethewizard"
category: "AI"
tags: ["claude code", "loop command", "scheduled tasks", "seo automation"]
excerpt: "Claude Code's /loop runs a prompt on repeat. Without an interval it self-paces between one minute and one hour and can end on its own. How to use it for SEO."
---
`/loop` is a real Claude Code command that runs a prompt or slash command on a recurring interval while your session stays open. It shipped in version 2.1.71 in March 2026. If you type it without an interval, as a popular TikTok does, Claude chooses each wait between one minute and one hour and can end the loop by itself once it judges the task done.

## What the TikTok shows

A TikTok from @itsjakethewizard ("Jake | The Marketing Wizard") pitches `/loop` as an SEO automation. The on-screen prompt reads:

> /loop
> SEO-analyze a page of my website.
> Everything to change: technical, text, tracking.
> Write a changelog, save it as a PDF.
> Mark the page done. Go to the next one.

The narration says Claude will "wait a few minutes and then do it again until I tell you to stop." The command is real. The cadence and the stop condition work differently from that description.

## What is /loop in Claude Code?

The [Claude Code changelog](https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md) records it under version 2.1.71: "Added `/loop` command to run a prompt or slash command on a recurring interval (e.g. `/loop 5m check the deploy`)." The [npm registry](https://registry.npmjs.org/@anthropic-ai/claude-code) dates that release to 2026-03-06, about seven months before the video. Many later changelog entries fix how loops survive backgrounding, resume and restarts.

Anthropic documents it on the [scheduled tasks page](https://code.claude.com/docs/en/scheduled-tasks) as a bundled skill and calls it "the quickest way to run a prompt on repeat while the session stays open."

## How does /loop decide how long to wait?

It depends on whether you give an interval.

With a prompt and no interval, as in the video, "Your prompt runs at an interval Claude chooses each iteration." The docs explain: "After each iteration it picks a delay between one minute and one hour based on what it observed: short waits while a build is finishing or a PR is active, longer waits when nothing is pending. The chosen delay and the reason for it are printed at the end of each iteration."

With an interval, such as `/loop 10m` followed by the prompt, the loop runs on a fixed schedule. Claude Code adds jitter to spread API load. A `/loop 5m` job starts each run "4 minutes 45 seconds after the previous run," and other intervals can run late "by up to half the gap to the next run, and by at most 30 minutes."

If you want a predictable cadence, include the interval.

## When does /loop stop?

Not only when you tell it to. The docs list several ways a loop ends:

- In self-paced mode, "Claude can also end the loop on its own once the task is complete" by calling `ScheduleWakeup` with `stop: true`.
- If an iteration ends without rescheduling or stopping, Claude Code "schedules one fallback wakeup about 20 minutes later and ends the loop when that iteration doesn't reschedule either."
- Every recurring task expires 7 days after creation.
- Tasks "only fire while Claude Code is running and idle. Closing the terminal or letting the session exit stops them firing."
- A self-paced loop "isn't restored" when you use `--resume`, so you have to type `/loop` again.

For an SEO pass that could take hours, a closed laptop ends the run.

## /loop vs /goal

For a job that should finish when every page is done, the docs point to [`/goal`](https://code.claude.com/docs/en/goal). It re-runs turns until a separate model judges a stated condition met. In the docs' comparison table, `/loop` is the option whose next turn starts when "A time interval elapses." The docs' own example goal, "Working through a labeled issue backlog until the queue is empty," has the same shape as a page-by-page site audit.

## Can Claude Code save a changelog as a PDF?

Not with a built-in tool. The [tools reference](https://code.claude.com/docs/en/tools-reference) lists every built-in tool, and none writes PDFs. `Write` "Creates or overwrites files." The only PDF handling on that page is for reading, where long PDFs "render pages with `pdftoppm` from poppler-utils."

To get a PDF, Claude has to run a converter through `Bash`, and the converter must already be installed. `Bash` requires permission, so each conversion prompts you unless the session is in auto mode or the command is allowlisted.

The terminal in the video is an illustration. It prints `changelog-home.pdf`, an hourglass and "✻ looping until you say stop," but never shows a reply from Claude. A real fixed-interval loop confirms "the cadence and job ID," and the changelog shows a self-paced iteration as "Claude resuming /loop wakeup."

## How does /loop remember which pages are done?

Only through the conversation. Scheduled prompts fire "between your turns" in the same session, so "Mark the page done" lasts as long as that context does. Nothing in the docs saves that state across a closed terminal. A sturdier setup has Claude keep a checklist file in the project, so a restarted loop can read where it left off.

Where your site lives also matters. The video's terminal is titled `my-website`, which implies Claude has the site's source files. For a site on a hosted CMS, Claude reads pages with `WebFetch`, which the docs call "lossy by design" because Claude receives an extraction of the page rather than the raw HTML.

The prompt also asks for a list of "everything to change" and a changelog, not the changes themselves. The video says applying them belongs in "a whole nother conversation."

## Bottom line

`/loop` exists and suits recurring checks inside an open session. Typed without an interval, it self-paces between one minute and one hour and may stop on its own, so add an interval such as `/loop 10m` for a fixed cadence. For work that should continue until every page is done, `/goal` and a checklist file in the project fit better.

## Sources

- [Original TikTok from @itsjakethewizard](https://www.tiktok.com/@itsjakethewizard/video/7696957155513044238) - the video.
- [Run prompts on a schedule, Claude Code docs](https://code.claude.com/docs/en/scheduled-tasks) - `/loop` forms, pacing, stopping and limits.
- [Keep Claude working toward a goal, Claude Code docs](https://code.claude.com/docs/en/goal) - how `/goal` differs from `/loop`.
- [Tools reference, Claude Code docs](https://code.claude.com/docs/en/tools-reference) - built-in tools, `Write`, `Bash` and `WebFetch`.
- [Claude Code CHANGELOG.md](https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md) - the entries adding and changing `/loop`.
- [npm registry metadata for @anthropic-ai/claude-code](https://registry.npmjs.org/@anthropic-ai/claude-code) - release dates.
- [sorrycc's analysis of /loop in 2.1.71](https://gist.github.com/sorrycc/1b2166228413234928039e84a26a3b8f) - a third-party read of the launch build, which used a 10-minute default before self-pacing replaced it.
- [@itsjakethewizard on TikTok](https://www.tiktok.com/@itsjakethewizard) - the creator's profile.


## Video description and verification notes

**The `/loop` command in this video is real and shipped in Claude Code 2.1.71 on 2026-03-06, but the form typed on screen (no interval) runs in self-paced mode, where Claude picks each wait between one minute and one hour, prints the reason, and can end the loop on its own once it judges the task done, so "wait a few minutes and then do it again until I tell you to stop" misstates both the cadence and the stop condition. The artifact is a 76.54-second vertical clip, 1080x1920, in an MP4 container (ffprobe reports `mov,mp4,m4a,3gp,3g2,mj2`), HEVC Main video tagged `hvc1` at 1,740,415 bps and 30 fps across 2,295 frames, HE-AACv2 audio at 44,100 Hz stereo and 48,109 bps, 1,794,280 bps overall, 17,167,672 bytes on disk. TikTok's metadata puts the post at 2026-10-15 18:04:50 UTC from uploader `itsjakethewizard`, channel nickname "Jake | The Marketing Wizard". At capture on 2026-10-18 the counters read 64,200 views, 2,786 likes, 52 comments, 1,233 reposts, and 4,823 saves. I read all 38 extracted frames (2-second intervals) and kept 210 transcript words across 16 Whisper segments; the audio ends at 76.59 seconds, and the 8 segments from 75.70 seconds onward are Whisper tail output with invented text ("free bit moreила", "AI Seaten and FAIL"), which I discarded. Every frame shares one setup: a bearded presenter in black-rimmed glasses and a gray patterned short-sleeve shirt, seated behind a silver broadcast microphone on a boom arm, with framed film posters on the wall behind him. Frame 1 carries a title card reading "AUTOMATE YOUR SEO: THE CLAUDE CODE LOOP". Bold one-word captions track the narration (ONE, OPEN, GIVE, LOOP, SLASH, TECHNICAL, CHANGELOG, PDF, MINUTES, AGAIN, DEPLOY, CONVERSATION, and the closing "THAT'S WHERE I WOULD START WITH AI"). Frames 2 through 17 hold a dark terminal graphic titled "claude code - my-website" (rendered here with a hyphen) that fills in line by line: "✻ Welcome to Claude Code", "> /loop", "SEO-analyze a page of my website.", "Everything to change: technical, text, tracking.", "Write a changelog, save it as a PDF.", and "Mark the page done. Go to the next one." Frames 20 through 25 retitle the window "claude code - /loop running" and print "✓ /home → changelog-home.pdf", "⏳ waiting a few minutes...", "✓ /services → changelog-services.pdf", and "✻ looping until you say stop". Frames 27 through 29 show a white checklist card headed "YOUR WEBSITE" with EVERY PAGE, EVERY PRODUCT, EVERY SERVICE, and OPTIMIZED ONE BY ONE ticking green in sequence. Frame 32 reads "YOU CAN DO IT PAGE BY PAGE" over "RESULT".**

## /loop shipped in March 2026, seven months before this video

The video says "open up Claude code, okay, give it your website, and then say slash loop." The command exists. The [Claude Code changelog](https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md) records it under version 2.1.71: "Added `/loop` command to run a prompt or slash command on a recurring interval (e.g. `/loop 5m check the deploy`)". The npm registry's publish time for 2.1.71 is 2026-03-06T22:47:03Z. The video went up on 2026-10-15, so the feature was seven months old by then. The current release as I write is 2.1.303, published 2026-10-18, and 20 lines of the changelog between those versions mention `/loop`, most of them fixes to how loops survive backgrounding, resume, and process restarts.

Anthropic documents the command on the [scheduled tasks page](https://code.claude.com/docs/en/scheduled-tasks) rather than on the slash-command list, which does not mention it. That page describes `/loop` as a bundled skill and summarizes it as "the quickest way to run a prompt on repeat while the session stays open." I also pulled the skill definition out of the Claude Code 2.1.278 binary installed on this machine. Its description string reads "Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo). Omit the interval to let the model self-pace."

## The prompt as typed runs self-paced, so the cadence and the stop condition both differ from the narration

The on-screen prompt never gives an interval. It reads "/loop" followed by "SEO-analyze a page of my website." and three more lines. The docs cover that case in a three-row table: with a prompt and no interval, "Your prompt runs at an interval Claude chooses each iteration." The rule for choosing it: "After each iteration it picks a delay between one minute and one hour based on what it observed: short waits while a build is finishing or a PR is active, longer waits when nothing is pending. The chosen delay and the reason for it are printed at the end of each iteration."

So "wait a few minutes" is one possible outcome inside a one-minute to one-hour range that Claude sets per iteration. A fixed cadence requires an interval token. `/loop 10m` followed by the prompt creates a cron job, and the docs add that a `/loop 5m` job starts each run "4 minutes 45 seconds after the previous run", while other intervals run late "by up to half the gap to the next run, and by at most 30 minutes" because Claude Code adds jitter to spread API load across sessions.

"Until I tell you to stop" misses three documented ways a loop ends without the user. In self-paced mode, "Claude can also end the loop on its own once the task is complete" by calling `ScheduleWakeup` with `stop: true`. If an iteration ends without rescheduling or stopping, Claude Code "schedules one fallback wakeup about 20 minutes later and ends the loop when that iteration doesn't reschedule either." Every recurring task also expires 7 days after creation. The bundled skill text in the 2.1.278 binary gives the model the same instruction: stop when "the task is complete, further iterations can't make progress, or the user asked you to stop", and "Stopping is the loop's normal ending".

Two more constraints matter for an SEO crawl that could take hours. Tasks "only fire while Claude Code is running and idle. Closing the terminal or letting the session exit stops them firing." A self-paced loop "isn't restored" on `--resume`, so a closed laptop means typing `/loop` again. For a job meant to finish when every page is done rather than when a timer fires, the docs point to [`/goal`](https://code.claude.com/docs/en/goal), which re-runs turns until a separate model judges a stated condition met. Its comparison table lists `/loop` as the option whose next turn starts when "A time interval elapses."

## The terminal in the video is an illustration, and its last line contradicts the docs

The dark window titled "claude code - my-website" types out the prompt one phrase at a time in sync with the narration and never shows a reply from Claude. The "running" view prints checkmarks, an hourglass emoji, and the line "✻ looping until you say stop". A real fixed-interval `/loop` responds by confirming "the cadence and job ID", per the docs, and the 2.1.113 changelog entry says a self-paced iteration displays as "Claude resuming /loop wakeup". Neither appears in the graphic. The line "looping until you say stop" states the opposite of the documented self-paced behavior, in which Claude is instructed to stop once the task is complete or further iterations can't make progress.

The filenames `changelog-home.pdf` and `changelog-services.pdf` are props as well. The [tools reference](https://code.claude.com/docs/en/tools-reference) lists every built-in tool, and none writes a PDF. `Write` "Creates or overwrites files", and the only PDF handling on the page is on the read side, where page-range reads of long PDFs "render pages with `pdftoppm` from poppler-utils". Getting a PDF out of this loop means Claude runs a converter through `Bash`, which has to be installed on the machine first, and `Bash` is marked as requiring permission on the same page, so each conversion prompts unless the session is in auto mode or the command is allowlisted.

## "Mark the page done" lives in the session transcript unless Claude writes it down

The prompt's bookkeeping step, "Mark the page done. Go to the next one.", has no storage of its own. Scheduled prompts fire "between your turns" inside the same session, so Claude knows which pages it already covered only as long as that conversation context survives. Nothing in the docs persists that state across a closed terminal, and the self-paced loop itself is not restored on resume. A durable version of this workflow would have Claude keep a checklist file in the project so a restarted loop can read where it left off. The docs' own example of a goal condition, "Working through a labeled issue backlog until the queue is empty", is the same shape of task with the state held in an external queue.

The working directory also decides what "give it your website" means. The mock title bar shows a folder named `my-website`, which is the scenario where Claude can read templates and page source directly. For a site that exists only on a hosted CMS, Claude reaches pages through `WebFetch`, which the docs call "lossy by design" because an extraction prompt, rather than the raw HTML, is what Claude receives. The narration's "it will optimize each one individually" also overstates the typed prompt, which asks for "everything to change" and a changelog; the video itself defers applying changes to "a whole nother conversation."

## Who is making the claim

The channel checks out. The [@itsjakethewizard profile](https://www.tiktok.com/@itsjakethewizard) on 2026-10-19 showed the display name "Jake | The Marketing Wizard", 111.7K followers, 620 following, 636.7K likes, and the bio "Hire a wizard, not an agency! 2x Exits | Marketing Consultant, Author & Speaker Formerly thewizardmarketing". The video's caption summarizes the workflow accurately as far as it goes ("audits one page, writes a changelog pdf, marks it done and moves to the next page until you stop it"). The gaps are in what `/loop` does between and after those steps.

## Key Takeaways

- **Verified:** `/loop` is a bundled Claude Code skill, added in 2.1.71 (published 2026-03-06) and documented on the scheduled tasks page; the current release is 2.1.303 (2026-10-18).
- **Correction:** with no interval, as typed in the video, Claude picks each delay between one minute and one hour and prints the reason, so "wait a few minutes" is one case inside a documented range; `/loop 10m` followed by the prompt is the form that fixes the cadence.
- **Correction:** a self-paced loop can stop itself when Claude judges the task complete, falls back to a single 20-minute wakeup if an iteration neither reschedules nor stops, expires after 7 days, stops when the terminal closes, and is not restored on resume.
- **Clarification:** the terminal window is a graphic; the documented confirmations (cadence and job ID, or "Claude resuming /loop wakeup") do not appear, and "looping until you say stop" contradicts the skill's own stop instruction.
- **Clarification:** no built-in tool writes PDFs; `Write` creates text files, and PDF output requires a converter run through `Bash`.
- **Context:** for "finish when every page is done", the docs' `/goal` command stops on a model-verified condition rather than a timer.

## Resources

- [Run prompts on a schedule, Claude Code docs](https://code.claude.com/docs/en/scheduled-tasks) establishes the three `/loop` forms, the one-minute to one-hour self-paced range, the `ScheduleWakeup` stop, the 20-minute fallback, the 7-day expiry, the open-session requirement, jitter, and the resume limits.
- [Keep Claude working toward a goal, Claude Code docs](https://code.claude.com/docs/en/goal) establishes how `/goal` differs from `/loop` ("A time interval elapses" versus a model-judged condition).
- [Tools reference, Claude Code docs](https://code.claude.com/docs/en/tools-reference) establishes the built-in tool list, the absence of a PDF-writing tool, `Write` and `Bash` behavior, and `WebFetch` being lossy by design.
- [Claude Code CHANGELOG.md](https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md) establishes the 2.1.71 entry adding `/loop`, the 2.1.113 "Claude resuming /loop wakeup" entry, and the 2.1.248 entry making self-paced mode available on every provider.
- [npm registry metadata for @anthropic-ai/claude-code](https://registry.npmjs.org/@anthropic-ai/claude-code) establishes publish dates: 2.1.71 on 2026-03-06, 2.1.113 on 2026-04-17, 2.1.248 on 2026-08-27, and 2.1.303 on 2026-10-18.
- [sorrycc's analysis of /loop in Claude Code 2.1.71](https://gist.github.com/sorrycc/1b2166228413234928039e84a26a3b8f) is a third-party read of the launch build; it reports a 10-minute default when no interval was given, a behavior the current docs replace with self-pacing.
- [@itsjakethewizard on TikTok](https://www.tiktok.com/@itsjakethewizard) establishes the uploader's display name, bio, and follower and like counts on 2026-10-19.
