What Claude Code calls it
Claude Code supports scheduled tasks inside a session. According to the docs, /loop is the fastest way to run a prompt repeatedly. You can also graduate to desktop scheduled tasks or cloud routines when you need persistence beyond the current session.
| Mode | Best for | Limitation |
|---|---|---|
| /loop | Fast session-based polling, PR babysitting, build checks | Ends when the session ends |
| Desktop scheduled tasks | Persistent local workflows with file access | Requires your machine |
| Cloud routines | Durable remote scheduling | Less tied to your live local context |
The best use cases
CI babysitting
Ask Claude Code to check whether CI passed, inspect any failures, fix obvious breakage, and keep checking until the branch is healthy. This is exactly what session-scoped loops are good at.
PR review cleanup
Re-run a review prompt every few minutes, address newly arrived comments, and keep the branch moving without manually reopening the thread all day.
Deploy watch and rollback prep
Poll a deployment, compare health checks, and prepare a rollback summary if error rates spike. The value is not just noticing failure. The value is having a diagnosis waiting when you look back.
Recurring code hygiene
Run review loops around flaky tests, dependency drift, type regressions, or generated client updates in repos that change daily.
Useful starter prompts
/loop 5m check whether CI passed, inspect any failures, fix the smallest safe issue, and summarize what changed /loop check whether the deployment finished and tell me if latency, error rate, or logs suggest a rollback risk /loop 20m /review-pr 1234
Keep the objective tight. The best loops are narrow, observable, and easy to interrupt. If you ask for three different jobs at once, the workflow becomes harder to trust.
Where OpenClaw fits better
Claude Code shines inside an active coding session. OpenClaw shines when the workflow needs to survive beyond the coding window, touch multiple tools, or deliver results into messaging channels. In practice, the strongest setup is often both together.
A clean split of responsibilities
- Claude CodePatch code, inspect tests, loop on a live repo, and reason about a local development context
- OpenClawWake on cron, message humans, watch multiple surfaces, maintain memory, and coordinate adjacent ops work
A high-leverage combined pattern
- Use Claude Code
/loopto babysit the active coding task - Use OpenClaw cron to wake every morning and ask for repo status, deploy status, or release readiness
- Push the daily summary to Telegram or Slack so the workflow is visible outside the terminal
- Escalate only when something breaks, not every time the loop runs
Operator tip
Use Claude Code for depth, use OpenClaw for continuity. That split usually maps cleanly onto real work.
When not to use scheduled loops
- →Do not use them for workflows that must survive laptop sleep or terminal closure unless you move to a persistent task type
- →Do not let them mutate production systems freely without strong guardrails
- →Do not hide the output. A good scheduled workflow leaves a readable paper trail

