Published: 2026-06-11
The /goal Trick: Make Codex or Claude Code Loop Until a Goal Is Verified
Chapters / key moments (click to jump — plays here on the page)
Allie K. Miller shares a five-character habit she wants everyone using Codex or Claude Code to try: type /goal, give the agent a goal, and it loops on itself until it can verify that goal is met. The catch — and the whole skill — is that the goal has to be objectively verifiable. "Edit this blog post until it's under 500 words" is a clean yes/no; "make it funnier" is too subjective unless you give it an objective test, like three AI judges that must all agree.
Source video
"I type five characters before almost anything in AI now, then walk away while it loops…" by Allie K. Miller — Watch on YouTube →
Key Takeaways
- The move:
/goal+ a goal in Codex or Claude Code. The agent loops and keeps working until it verifies the condition is hit, instead of stopping after one pass. - The goal must be verifiable. Give it a binary, checkable condition — e.g. "edit this blog post until it is under 500 words." That's a clear yes/no the agent can confirm on its own.
- Turn subjective goals into objective ones. "Make this funnier" is too subjective — so build the test into the goal: "set up three AI judges; not complete until all three judge this funnier than the original." The loop continues until the eval passes.
- This is what 2026 AI looks like. Miller frames it as loops, systems, and AI-as-a-judge — the real skill is figuring out how to make outcomes verifiable and how to set up evals that decide when something is actually good.
- It's a two-second test. Open Codex or Claude Code, type
/goaland a verifiable target, and watch it loop on itself and do the work.
Commands & Code Mentioned
# Inside Codex or Claude Code:
/goal edit this blog post until it is under 500 words # verifiable: clear yes/no
# For a subjective target, build the eval into the goal:
/goal make this blog post funnier — set up three AI judges; not complete
until all three judge it funnier than the original





