MartinLoop

Give coding agents real jobs with hard budgets, verifier gates and signed run receipts — without babysitting every step.

Stars
★ 262
Last updated
6d ago
FARS reviewed
Sep 28, 2026
License
Apache-2.0
Primary language
TypeScript

At a glance

Works with
Universal · cross-platformCodex · Claude Code · OpenAI API
You'll need
Node.js 20+pnpm 10.x (source builds)An authenticated coding-agent CLI (Codex, Claude Code or Gemini CLI)Shell / CLINetwork accessLocal filesystemMCP Server
Typical use
A solo developer queuing a dozen coding jobs overnight: put a $2 budget and 3-attempt cap on each run, then read dossiers and receipts in the morning instead of scrolling logs.
Main limitation
No bundled model or agent: you must already have an authenticated Codex, Claude Code or Gemini CLI install, or supply your own OpenAI-compatible endpoint.
Website
martinloop.com ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-19
Source review
64/100 · Some gaps

What does this agent do, and when should you use it?

MartinLoop is an Apache-2.0 TypeScript CLI and SDK that wraps an existing coding agent in a governed run: you declare an objective, a verifier command, a USD budget, an iteration cap and path allow/deny globs, and MartinLoop drives the agent through a fixed DEFINE → PREFLIGHT → CONTROL → VERIFY → RECOVER → PROVE → ANALYZE lifecycle. It ships adapters for Claude Code, Codex and Gemini CLI plus an OpenAI-compatible path (--engine openai) covering Kimi K2, DeepSeek, Qwen, Mistral, Ollama, LM Studio and similar endpoints, so the job contract survives a change of worker. Every attempt lands in a JSONL run record that is HMAC-signed with a per-runs-root key, and martin dossier, martin runs verify, martin challenge and martin badge report an integrity verdict of verified, tamper_detected or unsigned. Completion is bound to fresh verifier evidence and collapses to exactly one of VERIFIED, STOPPED or NEEDS REVIEW, with runtime failures sorted into 13 canonical classes. The run store, receipts and rollback evidence stay local, with optional hosted dashboard sync through MARTIN_API_TOKEN and MARTIN_TELEMETRY_ENDPOINT. The same engine is exposed as an MCP server (@martinloop/mcp) and as a library via the exported MartinLoop class and adapter factory functions.

martin run <objective> --verify "npm test" --budget-usd 2 --max-iterations 3 auto-checks doctor, session-start and preflight, then executes only when the environment is ready. Budget preflight blocks an attempt before it would exceed policy, --max-tokens caps token spend, --allow-path / --deny-path bound writes, and policy checks reject unsafe verifier commands, risky path changes and secret-like task inputs before execution. Adapters (createClaudeCliAdapter, createCodexCliAdapter, createGeminiCliAdapter, createDirectProviderAdapter, createOpenAiCompatibleAdapter) normalize each attempt into JSONL run records and evidence summaries that are locally signed. After the run, martin dossier, martin runs get|verify, martin challenge and martin badge surface the outcome and integrity; martin share --latest writes a redacted run-receipt.json, run-receipt.md and proof-card.svg. Around that core sit martin audit (reads Claude Code session history locally and reports API-equivalent spend inside fix-and-retry loops, verifier failure counts and the longest retry chain), martin bench --suite under-3-challenge|ralphy-engineering-50 for deterministic benchmarks, martin demo --swarm for a 15-agent local simulation, and the @martinloop/mcp package that gives MCP hosts one write-capable execution entrypoint plus planning, inspection and review helpers.

  1. A solo developer queuing a dozen coding jobs overnight: put a $2 budget and 3-attempt cap on each run, then read dossiers and receipts in the morning instead of scrolling logs.
  2. A platform team adding a spend gate to CI: the examples/github-actions-budget-gate/ example pins budget and verifier commands into the pipeline so a run stops at the boundary.
  3. An engineering manager who wants the loop tax measured before rewriting the workflow: run martin audit once and see how much equivalent API spend went into fix-and-retry cycles.
  4. Compliance-sensitive work that needs an auditable trail: every governed run leaves a signed record whose integrity can be re-verified and exported as a redacted bundle.
  5. Teams already switching between Claude Code, Codex and Gemini CLI who want one job contract — budget, scope, verification, outcome — regardless of the worker.
  6. Developers embedding governed runs in their own product with the MartinLoop class and adapter factories from the npm package.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npx -y martin-loop@latest --version
  • npx -y martin-loop@latest enable --engine codex
  • npm install -g martin-loop@latest
  • pnpm install --frozen-lockfile
Runtime
Node.js 20+

How do you install or deploy this agent?

Per the README you need Node.js 20+ and a coding-agent runtime you have already installed and authenticated (Codex, Claude Code or Gemini CLI), or an OpenAI-compatible endpoint. There is no server to deploy; the CLI runs straight from npm.

Confirm the package resolves:

npx -y martin-loop@latest --version

If more than one supported runtime is detected, pick one before the first governed run:

npx -y martin-loop@latest enable --engine codex

Optional global install:

npm install -g martin-loop@latest
martin-loop --version

Building from source needs pnpm 10.x:

git clone https://github.com/Keesan12/martin-loop.git
cd martin-loop
pnpm install --frozen-lockfile
pnpm lint
pnpm test
pnpm build

How do you use this agent?

Measure first. audit reads Claude Code session history locally and reports the API-equivalent spend that went into fix-and-retry loops:

npx -y martin-loop@latest audit

Add --offline to cut all network access, or --share for a screenshot-ready SVG plus Markdown summary.

Then run a governed job — the verifier command, budget and attempt cap are the contract:

npx -y martin-loop@latest enable --engine codex
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
npx -y martin-loop@latest dossier --latest
npx -y martin-loop@latest runs verify --latest
npx -y martin-loop@latest share --latest

To check readiness without spending, use the inspect-first flow:

npx -y martin-loop@latest doctor
npx -y martin-loop@latest preflight "Summarize the demo workspace and prove tests still pass" --verify "npm test"

Embed it in your own TypeScript code with the SDK:

import { MartinLoop, createClaudeCliAdapter } from "martin-loop";

const loop = new MartinLoop({
  adapter: createClaudeCliAdapter({ workingDirectory: process.cwd() }),
  defaults: {
    workspaceId: "my-workspace",
    projectId: "my-project",
    budget: { maxUsd: 3, softLimitUsd: 2.25, maxIterations: 3, maxTokens: 20_000 },
  },
});

const result = await loop.run({
  task: {
    title: "Fix auth regression",
    objective: "Fix the failing auth regression tests",
    verificationPlan: ["pnpm test"],
    repoRoot: process.cwd(),
  },
});

console.log(result.decision.status);

Wire it into an MCP host:

codex mcp add martin-loop -- npx -y @martinloop/mcp
claude mcp add --transport stdio --scope user martin-loop -- npx -y @martinloop/mcp

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

What are this agent's strengths and limitations?

Pros
  • Worker-agnostic governance: Codex, Claude Code, Gemini CLI and OpenAI-compatible endpoints share one budget, scope, verifier, receipt and integrity contract, so swapping the model does not rewrite the job.
  • Enforcement happens preflight: --budget-usd, --max-iterations and --max-tokens stop the next attempt before it exceeds policy rather than reporting the overspend afterwards.
  • Tamper-evident local evidence: JSONL records are HMAC-signed with a per-runs-root key and runs verify / dossier return verified, tamper_detected or unsigned.
  • Completion is bound to verifier evidence and resolved to VERIFIED, STOPPED or NEEDS REVIEW, with runtime failures classified into 13 canonical classes so you know why a run stopped.
  • Shareable handoff: share --latest produces a redacted JSON receipt, Markdown recap and proof-card SVG that can be passed on without leaking raw run-store files.
  • Multiple entry points: CLI, npm SDK with exported adapters, an @martinloop/mcp server, and a GitHub Actions budget-gate example.
Limitations
  • No bundled model or agent: you must already have an authenticated Codex, Claude Code or Gemini CLI install, or supply your own OpenAI-compatible endpoint.
  • The public line is still 0.10.0 pre-1.0, and the README itself recommends pinning the version because plain npx martin-loop can resolve a stale local cache.
  • A fresh interactive install enables anonymous telemetry by default (sent only after a one-time disclosure); opting out needs martin telemetry off or environment flags.
  • Cost fidelity depends on the host: Codex usage is labelled estimated unless the host exposes authoritative numbers.
  • The shipped benchmarks (under-3-challenge, ralphy-engineering-50) are deterministic repository fixtures, not an independent third-party evaluation.
  • demo --swarm defaults to local simulation that is not persisted and does not check signed receipt integrity; real governance requires --governed or --live.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
MartinLoop This agent 64 · Some gaps — ★ 262 6d ago TypeScript Codex · Claude Code · OpenAI API
Asqav SDK (Python + TypeScript) 71 · Some gaps Library / SDKFreemium ★ 511 4d ago Python —
Althar 55 · Major gaps Desktop appFree + model costs ★ 23 today TypeScript ChatGPT · Codex · Claude Code · OpenAI API · Claude API
Aura Code Audit Trail 50 · Major gaps CLIFree ★ 56 1d ago Rust Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
64/ 100 5-point scale 3.2 / 5
Trust 14/29
Reliability 8/14
Adaptability 14/18
Convention 14/18
Effectiveness 9/13
Verifiability 5/8
Why each dimension lost points
Trust14 / 29 · 2.4/5

Evidence shows least-privilege design (allow/deny paths, budget caps, policy checks) and least-privilege CI (scoped permissions, persist-credentials:false), but no explicit human-confirmation gate is shown before an agent writes code; telemetry is optional and local-first with cost provenance labels; secret-like input detection and redacted share bundles are claimed without shown implementation; dependency security relies on pnpm overrides pinning known-vulnerable packages (qs, hono, fast-uri) with no audit/SBOM evidence; rollback and HMAC-signed integrity are documented with commands; attribution is complete (Apache-2.0, repo, contact) though NVIDIA Inception and similar claims are independently unverifiable.

Reliability8 / 14 · 2.9/5

README, package. (0.6.9), release notes, and MCP package versions are mutually consistent; dependencies come from standard npm, but the README itself warns that npx may resolve a stale cache, leaving availability risk on users; the 13-class failure taxonomy plus doctor/preflight/triage shows serious failure-message design.

Adaptability14 / 18 · 3.9/5

Audience and scenarios (overnight unattended runs, budget-bounded jobs) are clearly described; capability boundaries are unusually explicit (VERIFIED is not bug-free; does not replace Git/CI/scanners), earning full marks; triggers and engine selection (claude/codex/gemini/openai) are documented; Node>=20 is stated but no full compatibility matrix is shown.

Convention14 / 18 · 3.9/5

Documentation architecture (llms.txt, docs tree, CLI/MCP references) is thorough; install notes are detailed including pinning and cache warnings; martin/martin-loop aliasing is explained; examples and a demo exist but the README is truncated mid-SDK and no FAQ is visible; known limitations are explicit; LICENSE is present but the appendix copyright placeholder is unfilled; multi-version release notes are aligned; SECURITY.md names latest-release support but maintenance identity is anonymous 'contributors'.

Effectiveness9 / 13 · 3.5/5

Output is delivered via dossier/receipt/share in three formats, well designed for usability; the budget/verifier governance wrapper offers real incremental value over bare coding-agent runs; cost-benefit is the product's core pitch, but the self-authored benchmark fixture ($2.30 vs $5.20) is self-certifying.

Verifiability5 / 8 · 3.1/5

Claims link to concrete docs/examples/benchmarks and are traceable; however all corroboration is self-published within the repository, so cross-source corroboration is weak; provenance labels (actual/calculated/estimated/unavailable) and the EVIDENCE_BOUNDARY mechanism explicitly separate fact from inference, a standout strength.

Risks and how to mitigate them
  • npx -y martin-loop@latest pulls the newest package at run time; behavior can change on supply-chain changes — pin the version.
  • Budget comparison figures ($2.30 vs $5.20) come from a self-authored fixture in the repo; treat them as self-certifying, not an independent benchmark.
  • No explicit human-confirmation gate before agent writes is shown; add your own confirmation layer for high-risk repositories.
  • Actual governance effectiveness (budget enforcement, verifier gates, rollback) requires hands-on validation in a controlled environment; this was a static review with no executed runs.
  • The LICENSE appendix copyright placeholder is unfilled; attribution is incomplete.
Evidence confidence: Low Reviewed Sep 28, 2026 Reviewed revision 73ba27b104ae
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/martin-loop.svg)](https://followagents.com/en/agents/martin-loop)
<a href="https://followagents.com/en/agents/martin-loop"><img src="https://followagents.com/badge/martin-loop.svg" alt="FARS review"></a>

FAQ

Is MartinLoop open source?
Yes. The source code is on GitHub (Keesan12/martin-loop) under the Apache-2.0 licence.
Is MartinLoop safe to use?
FollowAgents' FARS review (Sep 28, 2026) scored MartinLoop 14/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is MartinLoop still maintained?
Yes. The latest commit on GitHub is from 2026-11-19, within the last 30 days.
Who makes MartinLoop?
MartinLoop is published on GitHub by the account Keesan12. FollowAgents has not verified which person or company is behind that account.
What is MartinLoop's official website?
The project's GitHub repository lists https://martinloop.com as its website. That link is set by the repository owner; the source code itself is on GitHub (Keesan12/martin-loop).
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts