Skip to Content
loop.fun
Goals

Writing goals that can be checked

The hardest part of a goal loop is writing the goal, and turning intent into something a machine can check is a skill.

A goal loop is only as good as its goal. If the condition can't be checked, the loop can't stop. Claude Code's own docs warn that an underspecified or impossible goal can keep Claude looping indefinitely (docs, XDA's "I was using it completely wrong").

What makes a goal checkable

The guidance across vendor docs and practitioner guides converges on a few rules (MindStudio, Daily Dose of DS, Hermes docs):

  1. Describe a state of the world, not an activity. "All tests in test/auth pass and npm run build exits 0" rather than "work on the auth tests".
  2. Reference concrete commands or outputs. The judge needs something to look at.
  3. Put the scope in the goal. "…without modifying files under test/" closes the most common loophole (see reward hacking).
  4. Avoid conditions that need taste. "The code is readable" or "the UI looks good" need a human or a carefully designed rubric.
  5. Split big goals into sub-conditions you can check separately. "Refactor the whole codebase" can be valid but rarely finishes reliably in one run.
/goal make the checkout flow production ready

No observable end state. The judge will either accept the agent's claim or never be satisfied.

Let the agent draft the contract

Two of the more interesting ideas involve not writing the full goal yourself:

  • Hermes suggests letting the agent expand a one-line goal into a fuller contract before starting (docs). You review the contract, not the code.
  • Anthropic's long-running harness has the generator and evaluator negotiate a sprint contract before each chunk of work, listing the specific behaviours that will be tested (Anthropic, summary). A planner turns a short instruction into a detailed spec first, because without it the generator under-scoped.

Both treat goal-writing as its own step in the loop, done before any of the work.

The "loopability" test

A useful way to sort tasks, from the arXiv paper Stop Hand-Holding Your Coding Agent:

TaskLoopable?Why
Make the failing CI job greenYesExit codes are a deterministic check
Reduce p95 latency of endpoint X below 200 msYesA metric with a threshold
Migrate all callers from API v1 to v2MostlyA grep plus the test suite gets close
Improve the onboarding UXPartlyNeeds a rubric, a model judge or a human checkpoint
Write a Nobel-worthy novelNoNo reproducible check to stop on

Spec effort is real

Several practitioners note that defining a good loop can take more work than doing the task once by hand (Firecrawl, HN). Goal loops pay off for tasks that repeat, run long or are tedious, not for one-off five-minute fixes. The Hermes docs say the same: tasks where the agent does one turn and stops don't need /goal.

Further reading

loop.fun

Patterns, hints and tools for designing the loops that keep agents working, and for widening the set of loops you can think of.

© 2026 loop.fun · CC BY 4.0

On this page