Run any prompt on interval
Run a prompt repeatedly at a set cadence while your session stays open, polling for completion or status changes.
/loop [interval] <prompt : runs a prompt repeatedly on an interval while the session stays open. Claude parses the interval, schedules a recurring cron task, and confirms the cadence. Useful for polling a deployment, babysitting a PR, or periodically re-running another skill. Example: /loop 5m check if the deploy finished . See [Run prompts on a schedule](/en/scheduled-tasks
claude-code
More automation loops
Loop cost guardrails pattern
The four-part cost guardrail every agent loop should ship with: a hard iteration cap, a stop-after-N-turns clause in the goal text, a budget limit on SDK loops, and a /cost check inside the loop body.
Every loop gets: `MAX_ITER=20` hard cap, "or stop after N turns" in the /goal text, `max_budget_usd` on SDK loops, and a /cost check in the loop body.
automationmedium risk
Run workflows with dynamic sub-agents
Split a task into packets, run sub-agents in parallel, synthesize results, and verify completion.
/goal loop and verify until complete
automationlow risk
Set and ship autonomous goals
Run a persistent goal autonomously until completion, routing each task to the optimal model for cost and capability.
/goal <objective · /loop <task | Set a persistent goal · run autonomously until complete (≤25 turns) |
automationlow risk