← Back to all free guides

Put Claude Code
On Autopilot

Anthropic laid out four ways to keep Claude Code working without you telling it what to do next. Here’s exactly how I set up each one.

Anthropic’s Claude Code team calls these loops: Claude repeats a cycle of work until a stop condition is met. The four types differ in one thing, which is what you hand off. Turn-based hands off the check. Goal-based hands off the stopping point. Time-based hands off the start button. Proactive hands off the prompt itself.

New to the idea? Start with my loop engineering guide. Want the commands on one page? That’s my /goal, /loop and /schedule cheat sheet. Everything here needs a Pro, Max, Ultra, Team or Enterprise plan, in the terminal or the Code tab of the Claude desktop app.

1. Turn-Based: One Task, One Check

This is every normal Claude Code prompt. You give it a task, it works, checks the result, and stops when it thinks it’s done or needs you. Use it for one-off jobs you want to look at yourself.

01

Set it up

Nothing to turn on. Open Claude Code, type the task, and say how Claude should prove it worked. That proof is what saves you the extra rounds of back and forth.

If you check the same things every time, ask Claude to save those checks as a skill. Anthropic’s own example skill says never to call a change done just because the edit went through.

To stop it: press Esc. Claude keeps the work it finished so far.

Turn-Based Task
Fix the signup form on my homepage so new subscribers actually land in my email list. Keep the change small and don't touch anything else on the page. When you think it's fixed, open the page in the browser, sign up with a test email, and show me proof that it worked. If you get stuck or need a login from me, stop and tell me exactly what you need.
2. Goal-Based: Work Until It’s True

You set a finish line Claude can measure, like "get my homepage speed score to 90." Each time Claude tries to stop, a second model checks your finish line and sends it back to work if it isn’t met.

01

Set it up

Type /goal and your finish line. It starts right away. Put the attempt limit in the same sentence, like "stop after 5 tries," because the limit lives inside your condition. (Goal docs)

To actually walk away, turn on auto mode so Claude doesn’t stop to ask permission. Press Shift+Tab in the terminal until it reads auto mode, or pick it from the mode menu in the desktop app.

To check or stop it: /goal alone shows the status, the turn count and what it has spent. /goal clear cancels it. One goal runs per session.

The checker only reads what Claude shows in the chat, so ask Claude to print the proof. Lighthouse is the same test PageSpeed Insights runs.

Speed Score Goal
/goal Get my homepage's Lighthouse performance score on mobile to 90 or higher. Run the test after every change and print the score so I can see it. Don't change how the page looks and don't delete any content. Stop after 5 tries even if you're not there yet, and tell me what's still holding the score back.
3. Time-Based: Run It On A Timer

You give Claude a timer and a job. It runs the job on that rhythm until you cancel it or the work is done. Use it for checking things that change outside your project, like reviews, orders or a form.

01

Pick where it runs

  1. /loop in your session. Fastest to start, as often as every minute. It only runs while the session is open and your computer is on, and repeating loops end after 7 days. (Loop docs)
  2. A desktop scheduled task. In the desktop app’s Code tab, click Scheduled, then New task. It sees your files but needs the app open and your computer awake. (Desktop docs)
  3. /schedule in the cloud. Runs with your laptop closed, but no more than once an hour. (Scheduled task docs)

To stop it: for a timed loop like the one below, ask Claude to cancel it. Esc won’t stop it.

Every 30 minutes means /loop or a desktop task. Connect your review source first.

Review Watcher
/loop 30m Check [where my reviews live, like my Shopify store or Google reviews] for new customer reviews since the last check. Flag any complaint I need to deal with, tell me who left it and what they said, and write a short, kind reply I can edit and send myself. Never post or reply to anything. If nothing new came in, just say "all quiet."
4. Proactive: It Runs While You Sleep

This is the big one. A cloud scheduled task (Anthropic used to call these routines) starts on its own, with nobody watching, even with your laptop closed. Here’s how I set one up so bug reports get picked up, fixed, reviewed, and then wait for me.

01

Connect your project

Your site or app needs to live on GitHub. Install the Claude GitHub app on that repository. Then connect wherever bug reports land, like Slack, in your claude.ai connectors.

02

Create the task

Go to claude.ai/code/routines and click New task (some accounts still say New routine). Name it and paste the prompt below. Under Trigger, pick Schedule and choose hourly. Under Advanced settings, pick your repository and the Default environment. On the Connectors tab, remove every connector this job doesn’t need, because Claude can write with anything you leave on.

You can also type /schedule in Claude Code and it walks you through the same questions.

Bug Fixer Task
You're the bug fixer for [my site or app]. Check [my #bug-reports Slack channel] for bug reports posted since the last run, and if there are none, say so and stop. For each report, fix it on its own new branch with the smallest change that works, and don't touch anything unrelated. Then have a separate subagent review each fix like a tough reviewer, and fix whatever it flags. Open a draft pull request for each fix that explains the bug and the fix in plain English, and reply in the report's thread with the link. Never merge anything or push to main, because I approve what ships.

03

Test it, then approve what ships

Click Run now and open the run from History to watch exactly what Claude did. Cloud runs start in auto mode and push to branches that start with claude/, so nothing reaches your live site on its own.

Each fix shows up as a draft pull request on GitHub. Read it, and click Merge only when you’re happy. Want a hard guarantee? Turn on branch protection for your main branch so every change has to go through a pull request.

04

Know the limits

Scheduled tasks are a research preview on Pro, Max, Ultra, Team and Enterprise, and every run uses your normal plan usage. Use the on and off switch on the task page to pause it, or Delete in its menu to remove it. Anything it does through GitHub or Slack shows up as you.

Anthropic’s own version goes further, splitting the work across many agents with dynamic workflows. I walk through those in my dynamic workflows guide. The prompt above keeps it to one fixer and one reviewer subagent, which is plenty to start.

Start Here
  1. Pick one task you’re tired of checking on. Just one, the one you keep opening a tab for.
  2. Give Claude a clear finish line. A number, an empty list, or proof it can show you in the chat.
  3. Set a limit on how long it keeps trying. "Stop after 5 tries" for a goal, an end date or an hourly cadence for a timer.

Run it by hand a few times before you let it go alone. Once you trust it, move it one step up the list, from turn-based to goal, from goal to timer, from timer to proactive.