Claude Code New Feature: /loop - Let AI Work for You 24/7
1. New Feature Launched on March 7th
Claude Code now has a built-in /loop command - a session-scoped task scheduler.
What it can do:
- Automatically repeat prompts
- Monitor project status in background
- Set one-time reminders
Examples:
/loop 10m check if deployment finished
/loop every morning at 9:00 summarize my Slack mentions
remind me at 3pm to push the release branch
2. How to Use
Three Syntax Styles
Prefix interval:
/loop 5m check the build
Suffix with "every":
/loop check the build every 2 hours
No interval (defaults to 10 minutes):
/loop babysit all my PRs
Time Units
-
sseconds (rounds up to minutes) -
mminutes -
hhours -
ddays
One-time Reminders
remind me at 3pm to push the release branch
in 45 minutes, check whether the tests passed
3. Managing Tasks
View tasks:
what scheduled tasks do I have?
Cancel tasks:
cancel the deploy check job
cancel task abc12345
Maximum 50 tasks per session.
4. Real-World Use Cases
Deployment monitoring:
/loop 10m check deployment status and alert on errors
Auto-fix PRs:
/loop babysit all my PRs. When builds fail auto-fix
Daily morning briefing:
/loop every morning at 9:05 use Slack MCP to summarize mentions
CI checks:
/loop 15m check main branch CI, notify if red
Loop commands:
/loop 20m /review-pr 1234
5. How It Works
Timezone: Uses local timezone, not UTC. 0 9 * * * means 9am local time.
Time jitter:
- Loop tasks delayed up to 10% (max 15 minutes)
- On-the-hour reminders may fire up to 90 seconds early
Pro tip: Use 9:07 instead of 9:00 to avoid conflicts.
Execution timing: Runs when Claude is idle, won't interrupt current responses.
6. Limitations
Session-scoped: Tasks disappear when you close the terminal, not saved to disk.
3-day expiry: Auto-deleted after 72 hours, runs one final time before deletion.
No catch-up: Missed tasks won't run retroactively, only waits for next scheduled time.
Production use: For long-term tasks, use Desktop Scheduled Tasks or GitHub Actions.
7. Getting Started
Update Claude Code: https://code.claude.com
Try it:
/loop 10m check if main branch build is green
Check status:
what scheduled tasks do I have?
8. Summary
/loop transforms AI from passive responder to active worker.
Good for: Short-term monitoring, development debugging, temporary tasks.
Not for: Long-term unattended operations, production environments, tasks requiring persistence.
Official docs: https://code.claude.com/docs/en/scheduled-tasks
End of article
Top comments (1)
Amazing. Was just thinking this would be a great feature and boom, there it is!