The Codex completion-contract loop
A goal-planner-codex workflow that defines completion up front, tracks proof for every requirement, and prevents partial Codex wo…
A goal-planner-codex workflow that defines completion up front, tracks proof for every requirement, and prevents partial Codex work from being reported as done.
Use when
Use this for long-running Codex work, pull requests, runtime checks, or user-visible artifacts where a plausible partial result could be mistaken for completion.
The loop
Run $goal-planner-codex [task] for long-running Codex work where partial work could be mistaken for done. Landing a PR and verifying production is one example. Before acting, define every required outcome and its evidence. After each bounded action, mark requirements proved, weak, missing, or contradicted. Complete the Goal only when all are proved; otherwise stop as blocked, stalled, or exhausted. Ask before creating Goal state. Finish with the requirement-to-evidence table, status, owner, and next action.
Steps
- Recover a measurable definition of done for every ambiguous requirement.
- Record the requirements, scope, non-goals, evidence plan, and current status without expanding the requested work.
- Execute one bounded action at a time and attach current evidence to each affected requirement.
- Audit every requirement before closure and preserve honest blocked, exhausted, stalled, or contradicted states.
Verification
Every Codex Goal requirement has current, adequate proof. The final audit contains no weak, missing, or contradicted required item; otherwise the work remains open, blocked, or exhausted.
Why it works
A durable completion contract keeps the definition of done visible across long sessions. Mapping every requirement to evidence makes false completion easy to detect.
Maintain The Codex completion-contract loop?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/loops/codex-completion-contract-loop?ref=badge)