New changes use SDK Runs with local execution data in the user Comet data directory. References to
.comet/runtime/native/, standalone YAML recovery, and --finish apply only to Compat. For
default SDK operations, see Runtime and Archive
delivery.brief.md, Specs, and acceptance items. A change can be archived only after necessary checks and complete acceptance pass.
Each implementation round has explicit constraints: its inputs, available evidence, remaining failures or retries, and stopping conditions. The model does not iterate indefinitely.
The implementation and acceptance loop
Division of responsibilities between Agent and Runtime
Builder submits a candidate implementation, not proof that it passed. Before Verify, Builder must review implementation locations, evidence, and limitations for all confirmed criteria. Missing or unfinished work remains in Build. Runtime executes necessary checks, and an independent read-only Verifier decides whether the requirements are met. Self-review does not replace independent acceptance.
Verifier reads acceptance items, brief, Specs, actual implementation, and check results first. It reads Builder’s summary last as an investigative lead, reducing the influence of Builder’s own assessment.
The acceptance process led by Runtime
- Lock the candidate implementation. The Runtime records the candidate ID, the current implementation round, and the scope of this acceptance to ensure that subsequent results correspond to the correct code version.
- Run necessary checks. The Runtime executes test, build, or other project commands. The check results provided by Builder are only for reference and cannot replace the actual execution results of Runtime.
- Start the new Verifier Subagent. The Verifier checks the code in read-only mode and gives a conclusion only once for each acceptance ID within the current range.
- Verify the returned result. If the result contains missing items, duplicates, unknown acceptance ids, expired responses or identity mismatches, the Runtime will directly reject it and will not mistakenly mark it as passed.
- Decide on the next step. After the full acceptance is passed, it can be filed. Return to Build when acceptance items have failed; pause when product decisions or external information are needed and return the decision-making power to the user.
Partial repair and final full acceptance
Suppose the complete scope is A1–A8 and the first Verify fails A3 and A7. Builder focuses on A3 and A7 and checks what else the repair affects. The next Verifier still covers A1–A8.- Changed check inputs require fresh execution. Reuse requires valid inputs, commands, environment, and evidence.
- Failed acceptance returns its reasons to Build.
- Full acceptance advances to result acceptance or Archive, without another identical full verification.
request-checks; Runtime executes and records those commands, limits request rounds, and filters duplicates. Full logs stay local; the user report presents conclusions and relevant summaries.
Progress counters: iteration and attempt
The Native Loop uses two dimensions to locate the current progress:
For instance, when the Runtime starts a new Verifier acceptance attempt for the same candidate implementation,
attempt will increase, but iteration remains unchanged. The Verifier requests supplementary checks in the current attempt and does not add attempt separately. Only after the Builder modifies the code and submits a new candidate implementation will iteration proceed to the next round.
An acceptance result belongs only to the execution it came from: when the Runtime records a result, it saves it together with the candidate ID, the Verifier that performed the acceptance, the iteration and attempt at the time, and the acceptance scope. So when a slow old task returns its result very late and it does not match the current state, the Runtime does not adopt it. Long-running tasks, recovery from interruption, and parallel execution all rely on this rule to keep state from being overwritten by old results.
Progress judgment based on unresolved acceptance items
The Runtime does not assume that progress has been made just because “a lot of code has been changed this time”. It will compare the acceptance items that remain unresolved for two consecutive rounds: only when the unresolved items are indeed reduced and no new unresolved items are added can it be considered that reliable progress has been made. In set terms, the current unresolved items must form a strict subset of the previous round. The Runtime records the following counts:no_progress_count: The number of times that have not been strictly reduced for unresolved acceptance.failed_iteration_count: Realize the rounds that have not passed the acceptance.execution_failure_count: The number of times the Verifier task itself fails to execute.
native.max_verify_failures limit, with a default maximum of 5 rounds.
Failed acceptance and Verifier execution errors are recorded separately. The former means requirements are unmet or need clarification; the latter means the task did not complete normally. The Runtime permits at most 3 consecutive execution errors and 2 supplementary-check rounds per acceptance attempt. At the limit it pauses rather than retrying indefinitely or treating an error as success.
Fall back precisely according to the type of problem
The issues exposed by Verify are not necessarily all code errors. The Runtime will return the corresponding stage based on the type of problem:- Implementation omissions or code defects: go back to Build and fix the existing implementation;
- Changes in user-visible behavior or acceptance criteria: return to Shape, update the requirements and ask the user to reconfirm;
- New requirements that are not related to the current change: create another change to avoid expanding the current acceptance scope;
- Lack of user decision or external conditions: enter
await-userand specify what information needs to be supplemented.
A persistent state that can be recovered across tasks
The Native Loop does not rely on a certain model and always remembers the entire context. The Runtime will save the states for different purposes separately:comet-state.yamlsaves a stable state that is synchronizable and recoverable, as well as the next step.verification.mdsaves user-readable acceptance reports;.comet/runtime/native/saves the running status, logs, locks and transaction information of this machine.
Automatic progression with clear boundaries
The Runtime will stop the automatic advancement in the following situations and return a clear action:- There are still product decisions, external conditions or
blockedacceptance items that need to be handled by users. - The current code, branch, worktree or artifact root is inconsistent with the Runtime record;
- There is no reliable progress, failed rounds or execution errors reaching the budget;
- The Verifier is unavailable, or the current platform cannot prove that it is independent of the Builder.
- When multiple parallel changes modify the same capability, the archiving sequence needs to be determined first.
The core value of Native Loop
- Credible completion criteria: Archiving depends on Runtime checks and item-by-item acceptance, rather than Builder’s own statement.
- Independent acceptance: Builder reviews implementation and evidence, Runtime runs checks, and Verifier independently evaluates requirements.
- Controlled repair cost: Focus on unresolved items, retain valid checks, and independently verify the complete scope.
- Bounded execution: Stalled progress, acceptance failures, execution errors, and supplementary checks have explicit limits.
- Recoverable progress: State is recorded on disk, stale responses are rejected, and recovery does not depend on model memory.
- Visible limitations: Requirement changes, external blockers, or insufficient independence pause the flow with an explanation.

