Agent · Claude Code

    How to run Claude Code with less babysitting

    Give the Claude Code run a spend ceiling, an iteration cap and a verify command before it starts, and it can finish without you watching the terminal. Claude Code still writes the code; MartinLoop decides whether the run is allowed to be called done, and leaves a readable record of what it changed, why it stopped and what it cost.

    MartinLoop is an independent open-source project. Not affiliated with Anthropic. Claude and Claude Code are trademarks of Anthropic.

    What MartinLoop adds to a Claude Code run

    • Budget cap — hard USD ceiling per run via --budget-usd.
    • Verifier gate — a run is only marked done when --verify passes (tests, typecheck, lint).
    • Software receipts — every step written to a JSONL run receipt.
    • Failure atlas — errors routed into the 13-class failure taxonomy.
    • Trace intelligence — replay any run with martin dossier --latest.

    Install & run

    npx -y martin-loop@latest start
    # Alternative: install globally
    npm install -g martin-loop@latest
    martin run "your task for Claude Code" \
      --engine claude \
      --cwd . \
      --budget-usd 3 \
      --max-iterations 2 \
      --verify "npm test"
    martin dossier --latest
    martin runs verify --latest

    Full setup on the install page. Machine-readable integration guide at /for-agents.

    What we can prove, and what we can't

    • Open source, Apache 2.0, installable from npm as martin-loop — it wraps the Claude Code session you already run.
    • Every run writes an inspectable JSONL record: task, spend, stop reason, files touched, and a failure class when it fails.
    • Reproducible benchmark — $2.30 governed versus $5.20 ungoverned on the same flaky-CI-gate task.

    And the honest limits: MartinLoop is not built by Anthropic and is not a Claude Code plugin — it is a separate tool that runs the session and enforces the limits around it. A verified run means your configured checks passed, not that the change is safe to merge. Run records are inspectable, not cryptographically signed, and the hosted control plane is still in progress.

    Related concepts