promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Claude Code

/loop

Runs a prompt repeatedly for as long as the session stays open.

[Skill] Without an interval, Claude paces itself. Without a prompt, an autonomous maintenance check runs, or a prompt from .claude/loop.md. Example: '/loop 5m check if the deploy finished'. Docs: code.claude.com/docs/en/scheduled-tasks. Alias: /proactive.

โœ… WHEN TO USE IT?

Recurring check on a fixed interval

/loop 5m check if the deploy finished

Autonomous maintenance check without a fixed prompt

/loop

โ›” WHEN NOT TO?

One-off goal with an end condition

/loop repeats a prompt as long as the session stays open - for a task that should finish once and stop, that's the wrong mechanism.

Better: /goal

Schedule-based, beyond a single session

/loop only runs while the current session is open, not on managed cloud infrastructure across sessions/days.

Better: /schedule

SOURCES