Less than 24 hours after Anthropic released agent loops, the misinformation started flooding in. "Claude 2.0!" "24/7 agents!" "Talk to Claude Code via Telegram!"
None of that is true.
Agent loops are a useful feature. But if you come in expecting some paradigm-shifting moment for Claude Code, or thinking you can now have persistent sessions running forever in the background, you're going to be disappointed.
Let's cut through the noise and understand what this feature actually does—and when to use it.
What Are Claude Code Agent Loops?
Agent loops is a new feature in Claude Code CLI that allows you to run recurring scheduled tasks within a session. The key phrase there is within a session.
The feature was created by Boris Churny, the actual creator of Claude Code. Here are some of his example use cases:
/loop babysit on my PRs, autofix build issues, and when comments come in use work tree agent to fix them
By default, it runs every 10 minutes. Or you can set it to run every morning:
/loop every morning, use the Slack MCP to give me a summary of the top posts I was tagged in
You can run these for up to three days at a time.
But here's where people get confused: when you read "every morning," you might think Claude will do this forever. It won't. It will only run every morning if you keep that exact terminal session open.
Agent Loops Limitations You Need to Know
Before you build your workflow around this feature, understand these hard limitations:
⚠️ Critical Limitations
- Expires after 3 days — Maximum runtime, then it stops automatically
- Session-based — Close the terminal window, it ends
- Computer must be on — Sleep or shutdown kills it
- App must stay open — You need the session running
- Runs in same session — Output appears in your current terminal
That last point matters if you're actively working. Let's say you're in the middle of a coding conversation with Claude, and your scheduled loop is supposed to run. Claude won't interrupt your work. It will wait until you're done, then run the scheduled task.
So when people say this is a "24/7 agent" — pump the brakes. This is great for specific use cases during a work session. It's not a persistent background agent.
What Agent Loops Are Actually Good For
Given the limitations, what does /loop actually buy you?
It's best for micro-tasks that you'd repeat constantly during a work session. Think of things you'd manually check every few minutes while coding:
- Every 10 minutes: Check deployment status, make sure the site is still up
- Every 5 minutes: Run Playwright tests to confirm form submission works
- Every hour: Check for new PR comments and respond
- Continuously: Monitor build logs for errors and auto-fix common issues
💡 Think of it like a skill
Agent loops are essentially automation skills you can trigger while you work. Anything you find yourself doing repeatedly during a coding session — checking, testing, monitoring — can be turned into a loop.
Using it is simple:
/loop every 5 minutes run the test suite and notify me if anything fails
Or:
/loop every hour check our API endpoints and report any 5xx errors
The format is: /loop + time interval + what you want done.
Claude Code CLI vs Desktop: Scheduled Tasks Compared
Here's something most people don't realize: Claude Code Desktop is actually more powerful for scheduled tasks.
In the desktop app, there's a /schedule command that doesn't exist in the CLI. And it works differently:
| Feature | CLI (/loop) | Desktop (/schedule) |
|---|---|---|
| Expires | After 3 days | Never |
| Survives restart | No | Yes |
| Desktop must be open | N/A (CLI) | Yes |
| Computer must be on | Yes | Yes |
| Creates new session | No (same session) | Yes (each run) |
| Interrupts your work | Waits for you | No (separate session) |
With Desktop's /schedule:
- No 3-day limit — runs indefinitely
- Survives restart — close the app, reopen it, tasks still exist
- Creates new sessions — each scheduled run opens its own session, so it won't interrupt your work
The tradeoff? Each scheduled run creates a new session. So if you schedule something every minute, you'll have 60 sessions per hour. Plan accordingly.
✅ When to use which
CLI /loop: Short-term automation during a specific coding session (today, this project)
Desktop /schedule: Long-term recurring tasks (daily reports, weekly summaries)
When to Use GitHub Actions Instead
What if you need something truly persistent — running even when your computer is off?
That's where GitHub Actions comes in. Claude Code can run inside GitHub Action workflows on GitHub's infrastructure. Your computer doesn't need to be on. Desktop doesn't need to be open. Nothing on your end.
But there's a big caveat: GitHub Actions is scoped to GitHub itself.
This makes sense for:
- Reviewing PRs automatically
- Running code analysis on every commit
- Auto-fixing CI/CD issues
- Managing issues and discussions
It doesn't make sense for "I want to talk to Claude Code via Telegram." That's not what GitHub Actions is for.
Choosing the Right Tool for Your Task
Here's a decision framework:
| Use Case | Best Tool | Why |
|---|---|---|
| Monitor deployment during coding session | CLI /loop | Short-term, same session |
| Run tests every few minutes while building | CLI /loop | Project-specific, temporary |
| Daily morning Slack summary | Desktop /schedule | Long-term, recurring |
| Weekly code quality report | Desktop /schedule | Long-term, survives restart |
| Auto-review every PR | GitHub Actions | Runs on GitHub infra |
| Auto-fix CI failures | GitHub Actions | GitHub-scoped, computer-independent |
Key Takeaways
- Agent loops are session-based — they're not 24/7 persistent agents
- 3-day maximum — then they stop automatically
- Desktop /schedule is more powerful — no expiry, survives restarts
- Use /loop for project work — short-term automation during coding
- Use /schedule for recurring tasks — daily/weekly reports, long-term automation
- Use GitHub Actions for CI/CD — when you need computer-independent execution
The /loop feature is a genuine productivity boost. Just don't let the hype convince you it's something it's not.
Master Claude Code Workflows
Join Vibe Coding Academy for in-depth guides on AI-powered development, agent automation, and shipping faster with Claude Code.
Join the Academy