Claude Code Plugin

auto‑codex

A multi-model autonomous coding pipeline for Claude Code. This page walks through the flagship lane, /auto-codex: Codex plans, Opus reviews, Sonnet swarm implements, Codex is the final integrity gate. Three more lanes ship in the same plugin, including one that needs no Codex at all โ€” see below.

๐Ÿ”
Research
claude
๐Ÿ“‹
Plan
codex
๐Ÿ”’
Review
opus + codex
โšก
Swarm
sonnet ร— N
โœ…
Verify
claude
๐Ÿ“ˆ
Optimize
codex
๐ŸŽฏ
Complete
โ€”
The problem

Long autonomous Claude sessions burn tokens fast.

Letting one Claude session research, plan, review, and implement a task means every token of every phase comes out of your Claude budget. For a non-trivial task, that adds up quickly โ€” and the same model doing both the work AND reviewing it doesn't catch much.

Without auto-codex

One model, one budget

Claude plans, Claude implements, Claude reviews itself. No cross-check. Tokens stack up.

Claude tokens used โ‰ˆ 100%
With auto-codex

Right model per stage

Codex plans (your ChatGPT account). Opus reviews adversarially. Sonnet swarms implementation. Claude only orchestrates.

Claude tokens used โ‰ˆ 30%
Multi-model orchestration

Each model does what it's best at.

Codex is fast, structured, and great at writing plans. Opus is the strongest reviewer โ€” adversarial, finds edge cases. Sonnet is fast and parallelizable for implementation. Putting them together โ€” with cross-checks at every handoff โ€” beats any single model doing all three jobs.

CODEX
latest (gpt-5.5) ยท planner ยท gate
  • Drafts the implementation plan
  • Final integrity gate (verifies Opus findings resolved)
  • Iterates the optimize loop
OPUS
adversarial reviewer
  • Reviews Codex's plan โ€” finds what's missing
  • Reviews the swarm's implementation
  • Mandatory gate before code lands
SONNET
parallel implementer
  • Up to 6 subagents in parallel
  • One atomic task per agent
  • Writes code + tests per the plan
How it feels

One command. The pipeline runs itself.

Type /auto-codex and it does the right thing โ€” drafts a scope if there's no session, asks about an existing draft, or resumes a paused session. Stop and resume whenever.

claude code ยท /tmp/my-project
Pipeline breakdown

Seven phases. Each has a gate.

Hard gates between phases block sloppy work from reaching implementation. No vibes. Each phase produces a verifiable artifact before the next phase starts.

1
Research
Analyze the problem space, read code, identify constraints. Writes findings to tmp/research.md.
claude
min 50 chars to advance
2
Plan-Codex
Codex drafts an atomic, gateable plan. Opus reviews it adversarially. Findings logged.
codex + opus
tmp/plan.md
3
Review (hard gate)
Codex verifies every Opus FAIL item was resolved in the final plan. Approves or rejects.
codex
review_passed flag
4
Swarm
Up to 6 Sonnet subagents implement in parallel โ€” one atomic unit each. Opus reviews after.
sonnet ร— N
+ opus review
5
Verify
Runs the test suite + verification checks from the plan. Failing tests bounce back to swarm.
claude
tests must pass
6
Optimize (conditional)
If the plan declared a metric, Codex iterates โ€” propose change โ†’ eval โ†’ keep if improved, revert if not.
codex
auto-abort on 3 fails
7
Complete
Marks the task done, clears tmp/, picks the next task โ€” or deactivates when all done.
pipeline
โ†’ next task
The killer feature

The optimize loop.

After your code lands, an optional autonomous loop iterates on a single file to improve a metric. Codex proposes a change, your eval script runs, the change is kept if the metric improved or reverted if it didn't. Then it does it again. And again. For 30, 50, 100 cycles โ€” overnight if you want.

Inspired by
karpathy/autoresearch
Andrej Karpathy's 630-line Python script that ran 50 LLM-training experiments overnight, autonomously. We took the keep/revert pattern and wired it as the final phase of the auto-codex pipeline.
Live metric trace
Sharpe ratio ยท higher is better
cycles: 28
improvements: 9
best: 2.41
baseline
improvement zone
kept (metric improved)
Single-file constraint
Codex can only edit ONE file per cycle. Forces focus, blocks scope creep.
Auto keep/revert
Metric improved? Git-commit the change. Didn't? Revert it. No human in the loop.
History-aware prompts
Codex sees the last 15 experiments โ€” what worked, what didn't. Stops repeating losing ideas.
Safety stops
3 consecutive failures โ†’ auto-abort. Hostile eval or broken Codex CLI can't burn your night.
What people optimize
โ†’ Trading strategies
Sharpe ratio, drawdown, hit rate
โ†’ Model training
Val loss, accuracy, perplexity
โ†’ GPU kernels
Throughput, memory bandwidth
โ†’ Template engines
Render time, bundle size
โ†’ Tabular ML
Cross-val score, AUC
โ†’ Anything measurable
If you can print metric=value, Codex can optimize it.
Other lanes

This plugin ships four pipelines, not one.

Everything above describes /auto-codex, the flagship lane. Three more ship in the same plugin โ€” including two that need no Codex at all.

๐Ÿค–
/makeitso
Claude-only. No Codex, no external CLI. Same phase shape as /auto-codex, self-planned and self-reviewed by fresh Claude subagents.
claude only
no Codex needed
๐Ÿค–
/makeitso-codex
Codex plans and builds; Claude reads the plan once and the diff once. Minimizes Claude token spend. Offers /makeitso by name if Codex isn't available โ€” never switches silently.
codex
needs Codex
๐Ÿค–
/makeitso-project
19 gated phases for building whole projects from a spec: requirements, traceability, gap analysis, red-team, cleanup, deploy.
claude only
no Codex needed

Full lane comparison, subcommands, and setup details live in the README.

Install

Three steps. Mostly one-time.

You need Claude Code, Python 3.8+, and git. A Codex / ChatGPT account is only needed for the two Codex-driven lanes (/auto-codex, /makeitso-codex) โ€” skip step 1 if you're starting with /makeitso or /makeitso-project.

1

Install the Codex CLI (one-time, only for the Codex lanes)

This is the official OpenAI Codex CLI. The plugin uses it under the hood as the MCP server.

npm install -g @openai/codex && codex login
2

Add the marketplace + install the plugin

Run these inside any Claude Code session. The plugin auto-registers Codex as an MCP server.

/plugin marketplace add neonplants/auto-codex
/plugin install auto-codex@auto-codex-marketplace
3

Use it

cd to any project dir, then in Claude Code, pick a lane:

/auto-codex

The first run drafts a scope of work, asks you to fill in tasks, waits for your approval, then runs autonomously. Stop anytime with /auto-codex stop. No Codex installed? Run /makeitso instead โ€” same idea, Claude-only.