Agents20 September 2026

How to stop prompting your AI and give it a goal it can check itself against

Instead of correcting an agent step by step, give it a goal and a test it can run on itself, and let it work in a loop until it's actually done.

You write a detailed prompt, the agent comes back with something close but not quite right, so you write another prompt to fix it. That cycle repeats itself. It works fine for a quick question, but on real work it means you're still managing every step yourself.

Here's how to give an agent a goal instead of a prompt, a prompt to copy, and what to check before you let it work on its own in a loop.

Start with the basics

A prompt is an instruction for one step. A goal is something else: you define what the finished result should look like, give the agent a way to check for itself whether it got there, and let it work in a loop, checking itself again and again, until that criteria is met, instead of stopping after one reply. Peter Steinberger, who built OpenClock, put it bluntly: "You shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents." The idea has already become an official command, /goal, in both Claude Code and Codex.

Step 1: define the finished result, not the steps

Not "write me a report", but "the report is accurate for the last quarter, every number ties back to the source file". The result needs to be something checkable, not a general description.

Step 2: give it a rule it can test itself against

How will it know it's done? Give it something concrete: re-run the numbers against the source, confirm no link is broken, check the length falls in a certain range.

Step 3: tell it explicitly to work in a loop until the criteria is met

Prompt to copyMy goal is [a concrete finished result]. You'll know you're done when [a checkable criteria, e.g. every number in the report matches the source file, no link is broken, the length is between 500 and 800 words]. Work on this in a loop, check yourself against these criteria before showing me a result, and only come to me if you're stuck or missing information.

This wording matters because it hands the checking over to the agent itself, and you only step in once there's a finished result, or once it's genuinely stuck.

Wait, before you let it run on its own

A loop running against the wrong criteria will confidently produce the wrong result over and over. The first time you use this on a new kind of task, watch the first loop closely. Don't leave it running unattended on anything touching real money or going straight to a customer, until you've seen it hit the right criteria at least once.

What actually happened

Peter Steinberger's line about designing loops instead of prompts quickly turned into something the Claude Code and Codex teams built into an official command, /goal: you define a goal, and the agent works on it in a loop until it meets the criteria, instead of waiting for you to write the next step.

Do this next

Take the next task you'd normally write a regular prompt for, and instead write down the finished result and the check, using the template above.