The AI coding agent market has a gap. Every lab ships agents that can read repos, edit files, run commands, and retry tasks. None of them ship a hard stop.
MartinLoop is an open-source control plane that wraps Claude Code, Codex, and custom coding agents with budget caps, verifier gates, rollback evidence, and auditable run records. The core is Apache 2.0 licensed. The project launched on Product Hunt and GitHub in late May 2026, built by a solo developer under the handle Keesan12.
The pitch is direct. “Your AI coding run estimated $2.40. It kept retrying until the bill hit $65: 47 attempts, no hard stop, no rollback, no audit trail, and nothing clean to merge.” That scenario is not hypothetical. Anyone who has watched a Codex agent loop through 30 failed attempts on a trivial test fix knows the pattern. The agent does not know when to stop. The agent does not know what it cost. The agent does not produce a receipt.
MartinLoop’s answer is a runtime contract. Before a run starts, the user sets a budget in USD, a max token count, a max iteration count, and a verifier command. The tool tracks spend in real time and stops before the cap. It classifies failures into 12 categories: syntax errors get constraint repairs, hallucinations get grounding checks, budget exits get a clean stop. Every run appends structured JSONL evidence to ~/.martin/runs/. The dossier --latest command prints a receipt: what changed, what it cost, why it stopped, whether the verifier passed.
The demo comparison on the project’s challenge page is instructive. A governed MartinLoop run completes one verified attempt at $2.30. An uncontrolled retry loop spends $5.20, retries four times, and fails without an audit trail. The point is not that governed runs are always cheaper. The point is that the run becomes inspectable and enforceable. Budget policy, verifier success, stop reason, and evidence are explicit.
This is a market that has none of those things. Claude Code has no built-in dollar cap. Codex has no built-in dollar cap. Cursor has a soft usage limit that is easy to bypass. The labs ship agents that are powerful and unbounded. The user is responsible for the guardrails.
MartinLoop is not a coding agent. It is a layer around the agent. The project’s FAQ is explicit: “Claude and Codex are the workers. MartinLoop is the system around the work they do.” The architecture has five layers: a task contract with objective, verifier plan, and budget; a policy and budget layer with configurable defaults; agent adapters that normalize execution results across Claude CLI, Codex CLI, and direct-provider calls; a safety and verification layer that checks scope, verifier commands, and prompt integrity; and a persistence layer that writes JSONL run records and repo-backed artifacts.
The MCP integration is worth noting. MartinLoop exposes one governed execution tool plus read-only inspection tools for status, triage, run records, attempts, verifier results, and dossiers. That means it can plug into any MCP-compatible host: Claude Desktop, Codex CLI, Gemini. The agent calls martin_run instead of running raw. The control plane enforces policy.
The project is early. The open-source core is functional but the hosted dashboard, team controls, and enterprise governance features are listed as “Coming soon” with a waitlist. The documentation is thorough but the CLI reference and configuration reference are still being expanded. The solo-developer risk is real: one person maintaining a tool that wraps multiple fast-moving lab APIs is a maintenance burden that grows with every API change.
But the timing is right. The AI coding agent market is moving from autocomplete to autonomous work. Teams are running agents in production and discovering that unbounded retry loops are expensive and dangerous. The question is shifting from “Can AI write code?” to “Can we control, check, and trust the work it does?” MartinLoop is one of the first open-source projects to answer that question with a concrete tool rather than a blog post about best practices.
The hardest problem MartinLoop faces is adoption. Teams that are already comfortable with unbounded agents may not feel the pain until a $65 bill lands. Teams that are already using Anthropic’s or OpenAI’s enterprise governance features may not see the value in a third-party layer. The project needs a wedge: a specific pain point that the labs cannot solve because their incentives are to sell more tokens, not to cap them.
That wedge is the Ralph-style loop. The project’s documentation names it explicitly: “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. The labs cannot ship that feature because it reduces token consumption. MartinLoop can.
The question for AI builders is straightforward. Do you need a hard stop on your agent runs? Do you need an audit trail? Do you need to know what a run cost before you approve it? If the answer to any of those is yes, the labs will not give it to you. MartinLoop might.