21-Day Challenge
Day18

Day 18 — The /loop command — set Claude to work in the background automatically

Most people use Claude Code reactively — ask, wait, review, repeat. Today you learn to set tasks running in the background on a timer so Claude Code works while you do other things entirely.


Simple explanation

Welcome to Day 18. Everything you have done so far with Claude Code has been reactive. You ask. Claude Code responds. You review. You ask again. Today you go proactive. Claude Code runs tasks automatically — on a schedule — without you asking each time. What is the /loop command? /loop tells Claude Code to repeat a task at a set time interval — automatically — in the background. You set it once. It runs. You do other things. It keeps running. Each loop gets its own fresh context — so long-running loops do not get confused by earlier results piling up. How to use /loop Basic format: /loop [interval] [task] Examples: Check for errors every 5 minutes: /loop 5m check my project for any obvious errors and list them Monitor your live site every 10 minutes: /loop 10m check if my site is loading correctly and report any issues Run your launch checklist every hour during a build day: /loop 1h /launch-checklist How to stop a loop Type /loop stop in the same session to stop all running loops. Or simply close the terminal window — loops only run while the session is active.


What to do

The most useful loops for non-developers: Error monitor during a big build: /loop 5m check the project for new errors since the last check and list only new ones Use this when running a long Auto Mode session. While Claude Code builds in Session 1 — /loop monitors for errors in Session 2. You get a report every 5 minutes without watching. Daily content check: /loop 24h check all lesson pages for broken links, missing images, and any placeholder text that was never replaced Run this once and it checks your site every day automatically. Pre-launch performance check: /loop 30m check if the latest build is faster or slower than the previous one and report the difference Run this on launch day to catch performance problems before visitors do. Combining /loop with multi-clauding This is the real power move: Session 1: Auto Mode building your new feature. Session 2: /loop 5m monitoring for errors and reporting back. Session 3: You — doing something completely different. Three things happening. You actively involved in none of them. That is a professional-level workflow available to every non-developer who completes this challenge. Today's practical task 1. Open Claude Code. 2. Set up an error monitoring loop: /loop 5m check my project for any errors or broken references and list anything you find 3. While the loop runs — open a second session and make three small changes using the 4-part prompt formula. 4. Watch the loop report back after 5 minutes. 5. Review what it found. 6. Stop the loop with /loop stop. Today's result: Claude Code now works on a schedule. You are no longer the one who has to remember to check things.


Copy-paste prompt

/loop 5m Check my project for any new errors, broken references, or inconsistencies introduced since the last check. List only new issues — not issues from previous checks. If nothing new is found, say "All clear" and wait for the next interval.


Course note

The course covers advanced loop workflows — including how to combine /loop with sub-agents for continuous automated monitoring, and how to set up a loop that automatically fixes minor errors without asking for permission.

Key takeaway

/loop [interval] [task] sets Claude Code running on a timer. Set it once, let it run, do other things. Use it to monitor for errors during long builds, check your live site, or run your launch checklist automatically. Stop it with /loop stop.

Start here

Start the free 5-day challenge

Next step

Join the AI course waitlist

Resource

Get the free prompt pack

Was this helpful?