LazyCodex
LazyCodexv4.12.1

$ulw-loop

Uses .omo/ulw-loop state and an evidence ledger to continue until goals are verified.

$ulw-loop is LazyCodex's persistence command. It keeps working until the result is verified by evidence captured from real usage surfaces, not by hopeful status reports.

Use it when the work is open-ended and you want completion judged by evidence instead of the agent's own "done" declaration.

Syntax

$ulw-loop "task description" [--completion-promise=TEXT] [--strategy=reset|continue]
ComponentMeaning
"task description"The result to reach. Describe the desired outcome, not the steps.
--completion-promise=TEXTCompatibility syntax. Use it when a specific promise must be satisfied before completion.
--strategy=resetCompatibility syntax. Use it when the loop should restart from fresh state.
--strategy=continueCompatibility syntax. Use it when state should carry across iterations.

Runtime state is stored under .omo/ulw-loop.

FileRole
.omo/ulw-loop/brief.mdOriginal request and continuing constraints
.omo/ulw-loop/goals.jsonGoals and success criteria
.omo/ulw-loop/ledger.jsonlEvidence ledger for pass, fail, block, steering, checkpoint

How It Works

The loop is intentionally designed so the agent cannot end it by self-report alone.

It Keeps Working

The agent breaks the goal into criteria, plans the needed work, and gathers evidence. The latest flow uses internal CLI state such as omo ulw-loop create-goals, complete-goals, record-evidence, and checkpoint.

It Emits Completion Promises

Even when the agent thinks the work is done, that is only an intent signal. It does not end the loop. Each success criterion needs observable evidence.

Oracle Verifies

The verifier reviews the result against the evidence. Tests alone are not enough; real-surface evidence matters: HTTP calls, tmux transcripts, browser screenshots, computer-use logs, CLI stdout, and data diffs.

It Continues on Failure

If verification fails, the loop retries the criterion or records the failure/block in the ledger and moves to the next decision.

Failure Limits

The latest workflow has limits so the loop does not run forever.

ConditionLimit
Repeats on one goal without a full pass5 cycles
Same failure on the same criterion3 times

When To Use It

  • The work is open-ended: "make the flaky test suite pass", "make the build green", "finish this migration".
  • You want completion judged by evidence, not status reports.
  • You want the agent to keep iterating until the verifier approves.

Use $ulw-plan when the work needs decisions before code. Use $start-work when a written plan should be executed to the last checkbox.

On this page