Safe local loops for Codex CLI

Build safer local Codex CLI loops.

Latch Codex to proof, not vibes. Turn a task, verifier, and stop condition into an auditable bootstrap prompt, then review and run the loop locally. Your repository never comes here.

No repo access
Fixed least privilege
Auditable changes
Local control deck
One prompt. Fixed safety rails. Your repository stays local.
Browser only
Your loop
The boundaries are visible before anything runs.
Task
Validate every Markdown link.
Verifier
pnpm test && pnpm lint
Iterations
06 max
Sandbox
workspace
Auto-commit off · Auto-push off
Generated bootstrap prompt
Reviewable Markdown for Codex CLI. Not a hosted run.
TASK
Validate every Markdown link.

VERIFIER
pnpm test && pnpm lint

BOUNDARIES
- workspace-write
- max iterations: 6
- no auto-push

STOP
Verifier passes or safe stop.
Ready to reviewlooplatch.codex.md
Nothing is executed on this site.codex exec - --sandbox workspace-write

Define → Generate → Review → Run locally

The website stops at the handoff. You decide what to download, what to review, and when to run Codex inside your own repository.

  1. 01

    Define

    Set the task, done condition, verifier, budgets, and stop rules.

  2. 02

    Generate

    LoopLatch builds a deterministic Codex bootstrap prompt in your browser.

  3. 03

    Review

    Inspect the prompt, warnings, fixed permissions, and downloaded files.

  4. 04

    Run locally

    Run Codex CLI inside your repository and keep the whole harness on your machine.

Safety architecture

Every loop starts with rails, not exceptions.

LoopLatch keeps autonomy useful by making its limits inspectable. The website prepares the contract; your local tools remain in control.

Local by default
Task text and generated prompts stay in your browser. No account, repo upload, GitHub access, or analytics.
Built into every template
Bounded by design
Workspace-write is fixed. Iteration limits, time budgets, stop rules, and human gates are part of every loop.
Built into every template
Proof over promises
Only your verifier can establish success. Every local iteration keeps its result, logs, and patch available for review.
Built into every template

Different work. One locked safety contract.

Choose guidance for the job without changing the safety model. Every preset shares one schema, renderer, and generated-harness contract.

Included in v0.1
Each preset changes guidance, examples, and placeholders only.
5 templates

Test-Fix

Recommended

Iterate on failing tests until the configured verifier proves the fix.

Start with Test-Fix
task
Repair retry counter tests
verifier
pnpm vitest run src/retry-counter.test.ts

Feature Implementation

Deliver a bounded feature against an explicit done condition.

Start with Feature Implementation
task
Add CSV export to reports
verifier
pnpm vitest run src/report-export.test.ts && pnpm typecheck

CI Autofix

Diagnose CI output and prepare a minimal local patch without auto-push.

Start with CI Autofix
task
Fix strict type-check failures
verifier
pnpm typecheck

Review-Fix

Work through review findings while preserving a verifier-first stop rule.

Start with Review-Fix
task
Handle empty review state
verifier
pnpm vitest run src/review-state.test.ts

Custom

Start from the shared safety contract and supply your own guidance.

Start with Custom
task
Normalize fixture line endings
verifier
pnpm vitest run src/fixtures.test.ts
One deterministic renderer. No remote templates.
Field guides

Learn the operating model behind a useful loop.

Understand the control model, choose better proof, and prepare repository work before you ask Codex to repeat it.

9 min read

How to build a Codex loop harness

Learn how a Codex loop harness turns a scoped task, deterministic verifier, budgets, stop conditions, and audit files into a bounded local coding loop.

Read guide
10 min read

Safe agent loops: a practical control checklist

Design safer coding-agent loops with verifier-first success, least privilege, iteration and timeout budgets, audit files, one-action approval, and fail-closed stops.

Read guide
8 min read

Use Agent Skills with LoopLatch

Combine LoopLatch with promoted Agent Skills to clarify fuzzy tasks, check repository architecture, and map code impact before starting a bounded Codex loop.

Read guide
Optional local companions

Prepare better work before the loop repeats it.

LoopLatch controls repetition. Promoted Agent Skills can clarify the request, check repository rules, or map code impact before you start the bounded local loop.

LoopLatch does not install, detect, or remotely load skills. Review skill source before installing it in your own Codex environment.

  1. 01Clarify

    Codex Spec Interviewer

    Turn a fuzzy coding request into a verified implementation spec with explicit acceptance criteria and validation commands.

    Use when: The requested change is broad, ambiguous, or missing a testable done condition.

  2. 02Check architecture

    Architecture Compass

    Check implementation work against repository ADRs, stack rules, source ownership, runtime boundaries, and validation before code drifts.

    Use when: The repository has architecture evidence or the change crosses a durable boundary.

  3. 03Map impact

    CodeGraph + ast-grep

    Map affected files, symbols, callers, and exact code shapes before a bounded repair or refactor.

    Use when: The failure path or likely refactor impact is not yet clear from a focused file set.

Your code stays where it belongs: with you.

LoopLatch does not run Codex, ask for secrets, upload your repository, or require GitHub access. Prompt and ZIP generation happen in the browser, then you carry the artifacts across the boundary yourself.

  • No login
  • No repository upload
  • No hosted runner
  • No task analytics
Browser → artifact → local repository
The only handoff is the file you choose to download.
Generate
Download
Run locally
Review generated files before running the loop.
Build the loop. Keep the controls.
Define your proof, download the prompt, and hand it to Codex CLI on your machine.
Browser-only generation · workspace-write · no auto-push