Your coding agent says it's done. MartinLoop makes it prove it.
One system to control, verify and understand coding-agent work.
MartinLoop gives AI coding agents budgets, stop conditions, rollback rules, and receipts.
Built from thousands of agent runs where the problem was not intelligence -- it was uncontrolled execution.
Get started:npx -y martin-loop@latest start Try the demo:npx -y martin-loop@latest demo
MartinLoop is part of the NVIDIA Inception program.
Start Here
Install — run npx -y martin-loop@latest start, or install it globally with npm install -g martin-loop@latest.
Governed run — define an objective, verifier, budget, and iteration cap with martin run.
Verifier — completion requires fresh verifier evidence bound to the active run and workspace. A configured verifier proves only the checks it runs; VERIFIED is not a claim that the code is bug-free or automatically safe to merge.
Budget — set a hard spend ceiling with --budget-usd and an attempt ceiling with --max-iterations.
Receipts — inspect the latest result with martin dossier --latest and validate stored integrity with martin runs verify --latest.
MCP — install @martinloop/mcp@latest in a supported host or generate host configuration with martin mcp print-config.
When --model is provided, MartinLoop passes it through unchanged. Without --model, the authenticated host runtime chooses its own default. MartinLoop does not inject a hidden fallback model.
For AI Agents
MartinLoop is the execution-control system around coding agents. The coding agent still writes the code. MartinLoop governs the run and makes completion prove itself.
Use MartinLoop when a coding task needs one or more of these controls:
preflight readiness before agent spend
hard budget and iteration limits
allowed or denied edit scope
controlled retries and stop conditions
independent verifier commands
recovery and rollback evidence
a finite completion decision
run receipts, dossiers, history, failure classification, and post-run analysis
one control layer across Codex, Claude Code, and other coding-agent environments
Teams should not need to stitch together a separate script or point tool for every part of coding-agent execution. MartinLoop connects the control path around the agent from preflight through post-run evidence.
Stage
MartinLoop role
Define
Capture the objective, verifier, budget, scope, and finish line.
Preflight
Check readiness and required workflow evidence before agent spend.
Control
Enforce budgets, attempts, path boundaries, policy, and stop conditions while the coding agent works.
Verify
Run configured checks and bind the evidence to the active run and workspace.
Recover
Preserve recovery and rollback state when another attempt or human review is required.
Prove
Produce the authoritative VERIFIED, STOPPED, or NEEDS REVIEW handoff plus receipts.
Analyze
Inspect run history, cost provenance, failure classes, dossiers, and shareable evidence after execution.
MartinLoop does not replace Git, GitHub, CI, dedicated security scanners, observability platforms, code review, or the coding agent itself. It gives those workflows one governed execution record to inspect.
Why MartinLoop
AI coding agents are useful, but unbounded retry loops are expensive.
A task that looked like a small fix can become dozens of attempts, a blown token budget, and a diff nobody trusts. MartinLoop gives every run an explicit contract: objective, verifier, budget, scope, receipts, and a clear stop condition.
Use it when AI coding work needs to stay bounded, inspectable, and safe to review before it becomes expensive or destructive.
Why Teams Adopt MartinLoop
It turns agent behavior into inspectable run receipts you can actually review.
It enforces hard stop conditions before runaway retries spend more money.
It adds rollback-aware rules so failed attempts do not silently leave unsafe changes behind.
It helps teams compare outcomes across agents under one governed flow.
Teams use MartinLoop when they need governed agent execution that can be reviewed and trusted.
2-Minute Install Path
npx -y martin-loop@latest start
npx -y martin-loop@latest demo
cd martin-loop-demo
npm install
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1
Quick Start
Try MartinLoop in a disposable demo workspace:
npx -y martin-loop@latest start
npx -y martin-loop@latest demo
npx -y martin-loop@latest --version
cd martin-loop-demo
npm install
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1
npx -y martin-loop@latest dossier --latest
npx -y martin-loop@latest share --latest
Optional global install:
npm install -g martin-loop
martin-loop --version
If this flow is useful, open an issue with feedback so we can keep improving the public experience.
start prints the first-run guided path. run auto-checks doctor, session-start, and preflight, then executes when the environment is ready. Use --proof only when you intentionally want an explicit no-spend lane.
Inspect-first flow:
npx -y martin-loop@latest doctor
npx -y martin-loop@latest session-start
npx -y martin-loop@latest preflight "Summarize the demo workspace and prove tests still pass" --verify "npm test"
share --latest writes three files into the selected run directory under share/: run-receipt.json, run-receipt.md, and proof-card.svg.
MartinLoop's terminal presentation is built around the governed lifecycle, not around a single verifier command.
Governed Run Plan shows the configured finish line before work starts, including the task, budget posture, verifier plan, scope, and execution boundaries.
Controlled Run keeps the coding agent working inside those boundaries while MartinLoop tracks attempts, cost, stop conditions, and recovery state.
Verified Handoff closes the loop with one authoritative outcome:
VERIFIED when the configured evidence supports the Definition of Done
STOPPED when a configured hard boundary ends the run
NEEDS REVIEW when completion cannot be established from the available evidence
The handoff can include verifier steps, scope state, attempt count, cost provenance, unresolved evidence, recovery state, receipt integrity, and the next safe action. The exact fields depend on what the run actually established.
Visual Proof
MartinLoop turns an AI coding run into an inspectable execution record: budget used, verifier result, changed files, rollback evidence, and final receipt.
Ungoverned agents can retry until cost and scope drift. MartinLoop adds budget caps, verifier gates, and audit evidence so the run has a clear stop condition.
MartinLoop Arcade
Long governed runs do not have to mean staring at a spinner. In an interactive terminal, MartinLoop Arcade can be offered while the coding agent continues working in the background.
Arcade is presentation-only. It cannot change the agent, budget, verifier, policy decision, run outcome, or receipt evidence. It stays out of JSON, CI, non-interactive, and other machine-readable execution paths.
Use --arcade to offer Arcade immediately for a supported interactive run, or --no-arcade to suppress it for that run.
Proof Receipts
Proof receipts are local share bundles for governed AI coding runs. They show the task, spend, budget, verifier result, receipt integrity, and any evidence boundary that should not be rounded into confidence.
This real governed run spent $0.51 against a $3.00 budget. The verifier passed and the receipt integrity was signed, but the proof stayed at EVIDENCE_BOUNDARY because rollback evidence was not recorded.
Generate your own receipt after a governed run:
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --proof --verify "npm test"
npx -y martin-loop@latest runs verify --latest
npx -y martin-loop@latest share --latest
Use this lane from a clean temp directory to verify the public CLI flow exactly as shipped:
npx -y martin-loop@0.6.2 --version
npx -y martin-loop@0.6.2 start
npx -y martin-loop@0.6.2 demo
cd martin-loop-demo
npm install
npx -y martin-loop@0.6.2 run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1 --json
npx -y martin-loop@0.6.2 dossier --latest --json
npx -y martin-loop@0.6.2 share --latest --json
For deterministic installs, pin the package line (martin-loop@0.6.2) or use martin-loop@latest. Plain npx martin-loop can resolve a stale local cache on some machines.
Expected share bundle outputs:
share/run-receipt.json
share/run-receipt.md
share/proof-card.svg
See It In Action
The point is not that every governed run is always cheaper. The point is that every run becomes inspectable and enforceable: budget policy, verifier result, stop reason, and evidence are explicit.
For a deterministic public repro lane, use the benchmark workspace and compare governed execution to unbounded retry behavior:
A Ralph-style loop is the failure mode where an AI coding agent keeps trying without knowing when continuing is unsafe, uneconomical, or unlikely to succeed.
MartinLoop keeps the useful part of the loop, then adds brakes:
stop before budget overspend
classify unsafe or invalid actions before execution
write an audit record for every attempt
preserve rollback and verifier evidence for review
reduce runaway context growth with compact run summaries
Failure Taxonomy (13 Runtime Classes)
Public governed runs use one canonical taxonomy: the 13 runtime FailureClass values from @martin/contracts.
Defaults come from martin.config.yaml; CLI flags can override them. Budget preflight blocks attempts that would exceed policy.
Agent adapters
Claude CLI, Codex CLI, Gemini CLI, and direct-provider adapters normalize execution results.
Safety and verification
Scope checks, verifier command checks, prompt integrity, and grounding decide whether work can continue.
Persistence
JSONL run records, evidence summaries, and repo-backed artifacts make every run inspectable later. Each loop record is locally signed (HMAC, per-runs-root key) and dossier/runs get/runs verify/challenge/badge report an integrity verdict (verified / tamper_detected / unsigned) so post-hoc edits to a record are detectable, not just inspectable.
Trust Boundaries
Cost and token outputs always include provenance (actual, calculated, estimated, or unavailable).
For Codex specifically, MartinLoop reports authoritative usage only when the host exposes it; otherwise MartinLoop labels usage as estimated and avoids presenting it as settled accounting.
Receipt integrity must be verified before a run is treated as trustworthy evidence for external review.
--budget <n> Hard cost cap in USD
--budget-usd <n> Alias for --budget
--soft-limit-usd <n> Soft budget threshold in USD
--verify <cmd> Verifier command after each attempt
--proof Run verifier-only evidence checks without claiming governed execution
--max-iterations <n> Maximum number of attempts
--max-tokens <n> Maximum token budget
--engine <name> Adapter to use: claude, codex, gemini, or openai
--cwd <path> Repo root for the run
--allow-path <glob> Restrict writes to this path pattern; repeatable
--deny-path <glob> Block this path pattern; repeatable
--runs-dir <path> Override the local Martin runs root
Examples below use npx martin-loop so they work without a global install. If you install martin-loop globally, the martin alias works too.
Use martin-loop share --latest after dossier when you want a redacted bundle you can hand to another person without sending raw run-store files.
The root martin-loop package, standalone @martinloop/mcp package, plugin metadata, and MCPB product version are aligned at 0.6.2. The MCPB manifest schema remains 0.3.
The public MCP release train labels are:
0.1.4 operator foundation
0.2.0 cockpit expansion
0.2.5 public MCP package line
0.2.7 usability and review release
0.3.0 host adoption and onboarding release
0.3.1 review and handoff release
0.5.3 execution-control and host-compatibility release
0.5.5 governed-autonomous execution and proof-surface release
0.5.6 hosted run sync, fail-closed rollback, and verified-completion hardening
The standalone MCP registry/server identifier is io.github.Keesan12/martin-loop.
MartinLoop is part of the NVIDIA Inception program.
Telemetry & Privacy
MartinLoop sends minimal anonymous usage data to help improve reliability and prioritize development. A first-run notice appears before any data is transmitted. No data is sent on that first run.
What is sent:
Random installation ID (generated locally, never linked to your identity)
Per-process session ID
CLI version, Node version, OS and architecture
Event name and timestamp
Command category, run duration, success/failure category
Whether a receipt was generated; whether recovery occurred
Open-source command center for governed AI coding agents with built-in onboarding, hard gates, MCP, and shareable run receipts.
The npm package martin-loop receives a total of 105 weekly downloads. As such, martin-loop popularity was classified as not popular.
We found that martin-loop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.