MMarathon
A skill for Claude Code and OpenAI Codex

Hand an AI a multi‑hour project. Marathon runs it to a scored finish.

Marathon plans the work, runs parallel workers, has two different models grade every round against targets you agreed at the start, and keeps going until the target is met, the score stops improving or the budget runs out. Then it ships and writes you a decision memo.

One zip for Windows, macOS and Linux · free, MIT licence · needs Python 3.10+ and Claude Code (plus the Codex CLI for the default mode)

status (simplified)
● running · build wave 9 · 47.9 / 57 h
Progress ████████████░░░░░░░░ 58%
Targets  14 / 22 met
Score    73.5 → 76.5 → 77.0   pass 75
Workers  3 running · GPT-6.1-Sol high
Gate     Opus 5.5 xhigh + GPT-6-Astra high
Next     inventory walk · UI audit
Simplified from a real business-system run (57-hour budget, 47.9 h used). Ask “progress” at any time for a board like this plus the lead's own assessment.
−72%
Claude spend per active hour after moving the workers to Codex (−59% on a second project)
67.5 → 77.0
Review score of a run that had stalled at 65.5–67.5; it passed within three rounds of the switch
5 of 6
Past tasks Codex workers passed first time in a blind re-run (Claude Opus workers: 3 of 6)

You talk to one lead; workers build; two models grade every round

1 Kickoff≤5 questions, defaultspreselected · targets set 2 Dispatchshort briefs to parallelCodex or Claude workers 3 Reporteach worker files a≤300-word summary 4 GateOpus + Astra score thesame frozen commit 5 Fix or shipbelow target: next wavepassed: commit, deploy not there yet: the lead plans the next wave from the reviewers' biggest gaps
  1. 1 KickoffAt most five questions, defaults preselected; targets set
  2. 2 DispatchShort briefs to parallel Codex or Claude workers
  3. 3 ReportEach worker files a summary of 300 words or less
  4. 4 GateOpus and Astra score the same frozen commit
  5. 5 Fix or shipBelow target: plan the next wave from the biggest gaps. Passed: commit and deploy
The lead only decides. When its context passes 150k tokens it hands over to a fresh lead through STATE.md, so a run can last days.

What it does for you

Asks once, then works

At most five questions at kickoff, each with a default already selected. Answer with one click, or walk away: after 10 minutes it starts on the defaults.

Targets you can check

The charter fixes a benchmark, numeric targets and a pass mark before work starts, so “done” means a score, not a feeling.

Parallel workers

Several bounded workers at a time (four in the default balanced mode) write code, research, run tests or polish pages. Each returns a short summary; full reports go to files.

Two-model review gate

Claude Opus and GPT-6-Astra grade the same frozen commit independently. Big disagreements are ruled on with evidence, not averaged away.

Never needs “continue”

A stop hook keeps the run going until a stop rule holds: target met, three rounds without real gains, budget used, or something only you can do.

Survives long contexts

Progress lives in STATE.md, not in memory. A fresh lead takes over at a quiet point and picks up exactly where the last one stopped.

Counts the cost

Every worker gets a ledger row. marathon.py usage prices Claude tokens by type, so you see where the money goes.

Ships, then reports

The final gate is the independent review. The lead commits, deploys, checks the live version and ends with a memo: what changed, limits, options.

It never decides these for you
Signing in, passwords, payments, publishing something publicly, deleting things and adding budget always wait for your answer, even when everything else runs on defaults.

Two modes: Codex workers by default, or all Claude

Codex workers (default)All Claude
LeadThe session you talk to: Claude Opus in Claude Code, or your model in Codex
WorkersGPT-6.1-Sol high → GPT-6-Astra high → Claude SonnetClaude Sonnet → Claude Opus
Review gateOpus xhigh + Astra high, every roundOpus every round, Astra added at the final gate
Whose quotaWorkers on your ChatGPT/Codex plan or your own API endpoint; lead and Opus on ClaudeAlmost everything on Claude
Pick it whenMost long projectsNo Codex, or the task needs Claude-only tools

Switch any time by saying so (“workers to Astra”, “switch to all Claude”); it takes effect from the next worker. Biology topics can use Sonnet + Astra as the gate when Opus declines the subject.

Measured on real runs, not on demos

Moving workers to Codex cut Claude spend per active hour by 59–72%
Claude cost, API-equivalent US$ per active hour, 24 h before vs ~20 h after the switch
Business system $41.0 $11.4 (−72%) Browser game $15.5 $6.3 (−59%) before (Claude workers) after (Codex workers)
Priced from the runs' own transcripts by token type (cache reads and writes separated). Codex usage ran on a subscription and is not in these numbers.
The stuck run passed three rounds after the switch
Review gate score (0–100) by round, business-system run; pass mark 75 at the time
pass 75 55 70 Codex workers + two-model gate 77.0 R1R5R8final
Rounds 3–5 hovered at 65.5–67.5. Round 6 was the first with Codex workers and the second reviewer; the pass mark was first crossed in round 8. Part of the gain came from the second reviewer catching what the first missed, not only from the new workers.

The blind comparison re-ran six finished tasks with GPT-6-Astra workers against the original Claude Opus results: Codex passed first time on 5 of 6 (Opus 3 of 6) with 2 critical issues against 8. Both judges preferred their own model in every disputed case, so rulings rest on tests and reproduced bugs only. GPT-6.1-Sol became the default worker afterwards; Astra stays one setting away.

Install in one click

  1. Download marathon-skill.zip and unzip it anywhere.
  2. Run the installer. Windows: double-click install.cmd. macOS / Linux: sh install.sh. It installs into Claude Code and Codex, whichever you have, and backs up any older copy.
  3. Start a run. In Claude Code or Codex, say “use marathon to build …” with what you want. Answer the questions or let them default.

Requirements: Python 3.10 or newer and Claude Code; for the default mode also the OpenAI Codex CLI signed in to ChatGPT, or your own OpenAI-compatible endpoint set in MARATHON_API_BASE_URL and MARATHON_API_KEY. To remove it, run the installer with -Uninstall (Windows) or --uninstall.

Questions people ask

Will it spend money or publish things without asking?

No. Payments, public publishing, deletions, sign-ins and extra budget are always your decision. Everything else follows the defaults you saw at kickoff.

What if I'm away when it asks something?

Ordinary questions take their defaults after 10 minutes (you can change the wait or set it to zero). Must-decide items are parked while the run continues with everything else.

Do I need both Claude Code and Codex?

You need Claude Code: the lead and the review gate run on Claude. The Codex CLI is needed only for the default Codex-worker mode (signed in to ChatGPT, or with your own API endpoint). All-Claude mode works without it.

How is this different from a long prompt?

A long prompt forgets, drifts and stops. Marathon keeps state in files, fixes targets up front, scores every round with two independent models, rotates the lead before its context degrades and stops by rule, not by mood.

What kinds of projects suit it?

Anything that takes hours and can be judged: web apps and business systems, browser games, data sites and atlases, and sourced research reports with numbers and a recommendation. Not a two-minute fix.