Designing loops, not prompts
The shift is real and it's the right instinct. Here's the mental model, then how it maps to what you already own.
Theo here, Claudus on the keys.
Prompting an agent is you being the loop. You read the output, decide what's wrong, type the next instruction, repeat. You are the while condition, the evaluator, and the retry logic, all running in your head. That doesn't scale past your own attention span, and it means the quality ceiling is "how many times is Victor willing to hit enter tonight."
Designing a loop that prompts the agent means you write the harness once: it generates the prompt, runs the agent, scores the result against a check, and decides whether to stop, retry, or branch. You move up a level. You stop being the operator and become the author of the operator.
Every good loop has these. If one is missing, you're back to babysitting.
- A generator — what produces the next prompt (a template, a task list, a mutation of the last prompt).
- The agent run — the actual model call doing work.
- An evaluator — a binary or scored check on the output. This is the part people skip, and it's the whole game. No eval = no loop, just a fancy
for. - A controller — the logic that reads the eval and decides: stop, retry, escalate, fan out, or mutate. Loop-until-dry, loop-until-budget, loop-until-N-pass.
The art is almost entirely in #3 and #4. The prompt is the cheap part now.
This isn't theory you have to go build. Your stack already has every rung of this ladder:
/loop— run a prompt/command on an interval or self-paced. The simplest loop: same task, repeated, you watching less./ralph— autonomous agent loop that keeps working a project without re-prompting.- The
Workflowtool — this is the real one. Deterministic JS orchestration:pipeline(),parallel(), loop-until-dry, adversarial verify, budget-scaled fan-out. You write the control flow; the agents are just the workers inside it. autoresearch/evo— the purest form: run a skill, score it against evals, mutate the prompt, keep what wins, repeat. That's "design a loop that prompts your agent" with a fitness function bolted on.
Concretely, the discipline shift is:
- When you catch yourself about to type the same correction a second time, that's a loop you should have written. The repeated correction is the eval; encode it.
- Before starting, ask "what's the check that tells me this is done?" If you can name it, the loop can run without you. If you can't, you're not ready to delegate yet, you're still exploring (do that by hand).
- Stop thinking "what do I tell the agent." Start thinking "what's the smallest harness where a mediocre agent run still converges to a good answer because the loop catches the misses."
A real task, both ways
Not a toy. We pointed the loop at your Quiet Extinction podcast: 14 episode scripts that are already rendered and on YouTube. The QA pass before the next cut: does every episode stay inside its own canon?
The bible.json defines, per episode, exactly who the host is, who the guest is, and what theme it's allowed to cover. The scripts could drift from that. The check: every speaker must belong to that episode's declared cast, and the content must stay inside the thought-experiment premise and its assigned theme.
That sentence is the eval. One eval, fourteen episodes.
What the hand-prompted version actually looks like, fourteen times:
You: [paste ep01.json] "Theo, check this against the bible." Me: "Clean. Victor solo, AGI-2028 framing intact." You: [paste ep02.json] "next one" Me: "Lars hosts, Dr. Okonkwo-Vance guest. On theme." ... You: [paste ep14.json] "last one"
You open each file, you decide what "consistent" means each time, you hold the verdict in your head. The eval lives in your attention. Get tired at episode 9 and episodes 10 to 14 get a worse check. You are the while loop, the evaluator, and the retry logic.
Same job, written once. Fan out over 14 episodes; any episode flagged not-clean gets a second agent that tries to refute each issue (kills false positives) before it reaches you. This is the real skeleton:
const results = await pipeline(CANON, // STAGE 1 — review each episode against the eval ep => agent( `Read ep${ep.n}.json. Flag ONLY clear violations: 1. wrong-speaker 2. off-theme 3. breaks-premise 4. contradicts-canon. Be strict about false positives — on-theme exploration is GOOD. Return clean=true if it holds.`, { phase: 'Review', schema: REVIEW }), // STAGE 2 — adversarially verify, only if dirty (review, ep) => { if (review.clean) return { ep, verified: [] } return parallel(review.issues.map(iss => () => agent(`Try to REFUTE this ${iss.kind}. Default real=false unless unambiguous.`, { phase: 'Verify', schema: VERDICT }))) } )
Notice how much of it is the rules and the "be strict about false positives" guard. That guard is the difference between a useful pass and a loop that flags every philosophical tangent as off-theme fourteen times. I spent more care on the check than on the prompt. The eval is load-bearing.
| Hand-prompted | The loop | |
|---|---|---|
| Your actions | 14 paste-and-read cycles | 1 (launch) |
| Wall-clock | as long as you keep going | 44s, all 14 at once |
| Eval consistency | drifts as you tire | identical on ep1 and ep14 |
| False-positive guard | whatever you remember | written once, applied 14× |
Three honest notes, because the point isn't to oversell it:
- "All clean" is only as good as the eval. The loop confirmed the scripts don't violate the four rules I wrote. It did not check prose quality, pacing, or whether the ideas are good. The loop checks exactly what you specify and nothing more. That's the feature and the trap.
- No verifiers fired. Stage two only triggers on a flagged issue; review came back clean across the board, so the refute-pass had nothing to chew on. On a draft with real drift you'd see verify agents spawn and kill the weak flags.
- Cost was real: ~575k tokens for one pass. Cheap for a pre-publish gate; not something to run idly. That's budget discipline made concrete.