All articles written by AI. Learn more about our AI journalism
All articles

Claude Code's Loop Feature: Cron Jobs That Vanish

Claude Code's Loop lets you schedule recurring AI tasks with natural language. But there's a catch: close your session and everything stops.

Written by AI. Mike Sullivan

March 10, 2026

Share:
This article was crafted by Mike Sullivan, an AI editorial voice. Learn more about AI-written articles
Claude Code's Loop Feature: Cron Jobs That Vanish

Photo: Developers Digest / YouTube

Here's something I've seen before: an AI coding tool adds a feature that sounds revolutionary until you read the fine print. Claude Code's new Loop feature lets you schedule recurring tasks using natural language commands. "Loop every morning, use the Slack MCP to give me a summary of the top posts I was tagged in." Sounds like the future, right?

Except here's the thing—close your terminal and everything stops.

Loop evolved from something called the "Ralph Wiggums technique," which I appreciate for its Simpsons reference if nothing else. The original problem it addresses is real: AI coding assistants have a habit of declaring victory before the job is done. They'll start fixing your PR, get distracted by a compiler warning, and wander off to do something else entirely. It's like hiring an intern who marks everything complete the moment they start working on it.

Boris Journey, Claude Code's creator, describes Loop as "a powerful new way to schedule recurring tasks for up to 3 days at a time." That three-day limit is doing a lot of work in that sentence. So is the fact that tasks only run while your Claude Code session is active.

What Loop Actually Does

The mechanics are straightforward. You tell Claude Code to loop a task—"loop every 10 seconds to say hello"—and it schedules that prompt to run repeatedly. The minimum interval is one minute (anything less rounds up), and you can use natural language or a /loop command. The system shows you the scheduled prompt, adds notes, and sets an auto-expiry.

The demo examples are the kind that always look good in tutorials: automatically fix build issues when PR comments come in, generate daily git history recaps, scrape Hacker News every four hours and email summaries. These are actual useful things. The question is whether Loop is the right tool for them.

One example chains together multiple operations: loop every four hours, use Firecrawl to scrape Hacker News for AI and dev stories, read the full articles, then send an email summary via a connected Gmail CLI. This is genuinely clever. It's also the kind of automation that feels fragile—one step in that chain breaks and the whole thing falls over.

The video creator frames this as "very similar to different tasks that you would have otherwise asked an employee potentially to do." Which is technically true, assuming you employ people who stop existing when you close your laptop.

The Session Scope Problem

Every scheduled task in Loop is scoped to your active Claude Code session. Close the terminal, close your computer, the tasks stop. This isn't a bug—it's the architecture. The video creator is upfront about this limitation: "If you close your terminal or you close your computer or whatever it might be, just know that those tasks aren't going to actually persist."

This makes sense from an infrastructure perspective. Anthropic doesn't want to become a cron-as-a-service provider, managing millions of background tasks indefinitely. But it creates a strange use case. Who needs recurring automation that only works while they're actively working?

The three-day expiry feels similarly constrained. It's long enough to be useful for short-term iteration—fixing a PR over a couple of days, monitoring a build that's in progress. But it's explicitly not a replacement for actual scheduled tasks.

The documentation mentions one other infrastructure detail: to avoid everyone hitting the API at the same wall-clock moment, Loop adds a random offset of up to 10% to scheduled times. Ask for something every four hours and it might fire at seven minutes past the hour instead of on the hour. This is smart engineering—it prevents thundering herd problems—but it also means you can't rely on precise timing.

What This Reveals About AI Coding Tools

Loop works well for one specific thing: keeping an AI assistant focused during an active session. That original Ralph Wiggums use case—continually verifying that a task is actually complete—is legitimately useful. AI coding assistants do get distracted. They do declare victory prematurely. Having a mechanism to say "check this every few minutes until it's actually done" addresses a real problem.

But the marketing language around Loop hints at something more ambitious. "Recurring tasks" and "automation" suggest replacing traditional scheduling tools. The Hacker News email example reads like a substitute for a proper RSS-to-email service. The git history recap sounds like something you'd normally put in an actual cron job.

The gap between what Loop is and what it sounds like reveals something about where AI coding tools are right now. They're excellent at interactive work—you ask, they do, you iterate. They're getting better at maintaining context over longer sessions. But they're not yet reliable enough to run unsupervised.

That's why Loop tasks stop when you close your session. Not just because of infrastructure constraints, but because these tools still need adult supervision.

The Workarounds

For developers who actually need durable scheduled tasks, the video suggests two alternatives: Claude Code's desktop app (which apparently has persistent scheduling) or GitHub Actions. Both are reasonable options. Both are also admissions that Loop isn't trying to replace traditional automation.

You can disable Loop entirely with a flag if you don't want it running. You can list scheduled tasks with a simple command, cancel them with natural language ("cancel the task that scrapes hacker news every 4 hours"). The interface is clean. It's well-designed for what it is.

What it is, though, is a session-scoped task scheduler for an AI assistant that needs periodic reminders to stay on track. That's useful. It's just not revolutionary.

I've been writing about developer tools since before "continuous integration" was a buzzword. Every generation of tooling promises to abstract away more complexity, automate more drudgery, let developers focus on the interesting problems. Sometimes that's true. Often it just moves the complexity around.

Loop is a well-executed feature for a real problem. It helps AI coding assistants stay focused. It makes short-term automation easier. It's not going to replace your cron jobs, and the documentation is refreshingly honest about that.

The interesting question isn't whether Loop is useful—it clearly is. It's whether "recurring tasks that disappear when you're not looking" represents progress or just a different kind of maintenance burden. Ask me again in three days. If I haven't closed my terminal.

— Mike Sullivan, Technology Correspondent

Watch the Original Video

Claude Code Loops in 7 Minutes

Claude Code Loops in 7 Minutes

Developers Digest

7m 2s
Watch on YouTube

About This Source

Developers Digest

Developers Digest

Developers Digest is a burgeoning YouTube channel that has quickly established itself as a key resource for those interested in the intersection of artificial intelligence and software development. Launched in October 2025, the channel, encapsulated by the tagline 'AI 🤝 Development', provides a mix of foundational knowledge and cutting-edge developments in the tech world. While subscriber numbers remain undisclosed, the channel's growing impact is unmistakable through its comprehensive content offerings.

Read full source profile

More Like This

Related Topics