The flaws of an ordinary agent loop
A typical agent loop is model-driven:- Self-reported completion hallucination: the model says “I am done” but in fact never tested, never fixed, or never even touched the code.
- Context amnesia: after a long task is compressed or interrupted, the model recovers progress by guessing and loses track of “where it got to.”
- Infinite spinning: the same verification failure recurs repeatedly, and the model keeps “fixing” with no semantic progress.
Mechanism one: acceptance-gap backfill
When an ordinary loop fails, the model describes “what is wrong” in free text and recalls it itself next round. Native does not allow this — on a Verify failure, the Runtime derives a structured gap from the verified acceptance matrix:- which acceptance items failed (ran but did not pass);
- which acceptance items are missing (no evidence provided yet);
- which required checks failed.
Mechanism two: semantic-progress judgment
This is the key to preventing “infinite spinning.” In an ordinary loop, editing a file counts as “progress,” so the model can keep editing forever. Native’s standard is stricter: Only the following count as semantic progress:- the number of failed acceptance items decreased;
- a failing check turned green;
- missing evidence was supplied and restored to valid.
- files were edited or the implementation rewritten, but the set of failed acceptance items is unchanged;
- the implementation scope changed, but the gap is still there;
- the prose was rewritten, but the checks are still red.
Mechanism three: failure signature and three-stage stopping
The Runtime computes a signature for every failure: the current contract hash plus the sorted, de-duplicated failed acceptance items plus the failed check items. The same signature recurring triggers a progressive stop:
On the 3rd stop, the model is allowed one override to try a different angle — but it must carry a concrete new hypothesis, and the same signature cannot be overridden twice. This gives a strong model room to “try another angle” without letting it retry forever.
Mechanism four: the total failure budget
On top of per-signature stall detection, each contract also has a total budget: by default the same requirement tolerates at most five Verify failures (adjustable withnative.max_verify_failures).
When the budget is exhausted, the Runtime stops and hands control back to the user, stating the current evidence and three directions in one go:
- raise the ceiling;
- modify the confirmed requirement;
- stop.
Mechanism five: recovery depends on repository state
The state of the whole loop lives on disk, not in the conversation:- acceptance conditions and gaps ->
comet-state.yaml, the acceptance matrix; - in-phase progress -> checkpoints;
- verification evidence ->
verification.md, receipts; - implementation scope -> the implementation scope (content hashes).

