Lesson 06 · Loop Engineering

The heartbeat

Automations are what make a loop a loop, and not one run you did once.

You now have state, skills, a verifier and isolation. None of it repeats until something starts it without you. That is the automation.

What a good automation does

Not the work. The discovery. Osmani lists what OpenAI runs internally: daily issue triage, summarising CI failures, writing commit briefings, hunting bugs somebody added last week. Boring, recurring, and exactly the things you keep meaning to check.

In the Codex app you set the project, the prompt, the cadence, and whether it runs on your local checkout or a background worktree. Runs that find something go to a Triage inbox; runs that find nothing archive themselves. In Claude Code you reach the same place through scheduled tasks and cron, /loop, hooks on the agent lifecycle, or GitHub Actions if you want it running after you close the laptop.

Call a skill, not a wall of text An automation can invoke a skill. Do that. Osmani's reason: you fire $skill-name instead of pasting a giant wall of instructions into a schedule that nobody will ever update.

/loop versus /goal

These are two different primitives and the difference is the whole point of the course.

/loop/goal
Stops whenyou stop ita condition you wrote is true
Driven bya cadencea verifiable outcome
Who judgesnobodya separate small model, after every turn
Good forrecurring discoveryrun-until-done work

A /goal condition must be checkable, not vague. "All tests in test/auth pass and lint is clean" works. "The code is good" does not. Codex has the same primitive, also called /goal, with pause and resume.

Check yourself

What should a scheduled automation mostly be doing?

Which is a usable /goal stopping condition?

Write a cadence and a prompt for your first automation. One line each.

A strong first automation: daily at 07:00 — "run the $triage skill against yesterday's CI failures and open issues, write findings to LOOP.md, change no source files". Read-only for the first week.

Read the source

Primary source: the Automations, this is the heartbeat section of Loop Engineering. Codex users should also read the Codex automations docs.

Ask me. Tell me your repo and your working hours and I will draft the cron entry and the triage skill together.