Anthropic names four loop types: turn-based, goal-based, time-based and proactive.
Turn-based you steer; goal-based uses /goal; time-based uses /loop or /schedule; proactive runs on events or a schedule with nobody present.
One at a time. Tell it whether you knew, and the ones you did not stay in your pile.
Turn-based you steer; goal-based uses /goal; time-based uses /loop or /schedule; proactive runs on events or a schedule with nobody present.
Turn-based you steer; goal-based uses /goal; time-based uses /loop or /schedule; proactive runs on events or a schedule with nobody present.
/loop without an interval lets Claude pick each interval itself./loop 5m prompt fixes it. A bare /loop runs a built-in maintenance prompt, or your loop.md.
.claude/loop.md replaces the default prompt of a bare loop.The project file wins over ~/.claude/loop.md, and edits apply on the next iteration.
Esc and Ctrl+C do not stop it.
/goal is a checkable finish line with a cap.The loops post's example is a Lighthouse score of at least 90, capped at five tries.
Each iteration takes one task from a plan file on disk. The plan is disposable: regenerate it when it drifts.
They reject bad output so the loop can move fast and still stay correct.
pkill.Unattended agents need a loop they cannot reach: run it outside the process they control.
Each turn must look at fresh evidence, or you are just repeating a prompt.
Tune it against your own judgment over several rounds before you trust its "done".
Only use the heavy setup when the gap in quality justifies a cost of over 20x.