/goal vs /loop basics

Two primitives cover most of loop engineering. Pick by the shape of the work.

/goal vs /loop

The decision

Decision flowchart: /goal vs /loop

Rule of thumb: if there's a verifiable done-condition, reach for /goal first. Use /loop when the work is genuinely ongoing — and govern it hard.

The tool matrix

Where the primitives show up across tools (as of June 2026 — verify before relying; see SOURCES.md):

Tool /goal-style /loop-style Durable / scheduled
Claude Code yes yes (session) via scheduled agents
Codex yes yes via Automations
Cowork yes partial via routines
OpenCode yes yes DIY cron

Treat the cells as illustrative of the shape, not a feature contract — verify against each tool's current docs.

The durability ladder

How "durable" a loop is = how little babysitting it needs and how long it survives you walking away:

Durability ladder

One-shot → /goal/loop (session) → scheduled agent (cloud) → automation pipeline. Climb only as far as the task needs: more durability means more governance to get right.

The loop contract fields

Both primitives run better with an explicit loop contract — six fields that say what "done" means and what happens when it isn't. The canonical template lives in the loop contract; the fields are Goal, Context, Constraints, Done-when, Evidence, and If-blocked.


Next: Benefits →