codex-flow

codex-flow is a command for Claude Code from anhnguyen0905/codex-mcp. It costs 24 tokens per session (13,497 once invoked), scanned A, original, MIT.

A six-stage coding workflow in which Claude interviews you and plans the work, Codex implements each task, and Claude reviews the result. It starts with a preflight check and includes planning, task breakdown, execution, and review.

In plain words
What is it for?
Use it to prepare and execute multi-step coding projects, divide work into tasks, resume safely, and have the implementation checked against the plan.
Why use it?
It gives complex coding work a fixed sequence and stops early when the Codex server is unavailable or the user is not logged in.

Command for Claude Code

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the codex-flow plugin — 61 skills, 1 command, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/anhnguyen0905/codex-mcp/codex-flow
Clone the repo
git clone --depth 1 https://github.com/anhnguyen0905/codex-mcp

Made for: Claude Code.

Or install codex-flow, the plugin that ships this one along with the rest of its 61 skills, 1 command, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-flow

README.md
[![agentmods](https://agentmods.dev/badge/commands/anhnguyen0905/codex-mcp/codex-flow.svg)](https://agentmods.dev/commands/anhnguyen0905/codex-mcp/codex-flow)
Your own site
<a href="https://agentmods.dev/commands/anhnguyen0905/codex-mcp/codex-flow"><img src="https://agentmods.dev/badge/commands/anhnguyen0905/codex-mcp/codex-flow.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 13,497 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.13497
Opus 5 $0.00012 $0.06749
Sonnet 5 $0.00005 $0.02699
Haiku 4.5 $0.00002 $0.01350

Measured today against content hash 6efde25735c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-flow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/codex-flow.md · 622 lines

How it starts

The opening of the file, as written. The whole thing — 622 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex Flow — Plan with Claude, Execute with Codex, Review with Claude + Codex

Task: $ARGUMENTS

Follow these six phases (0–5) strictly. Do NOT write implementation code yourself — Codex does the implementation.

Each phase names plugin skills (codex-flow:*) to load via the Skill tool before starting the phase — they carry the detailed checklists. If a named skill is unavailable (command installed without the plugin), continue with the phase instructions below as written.

Phase 0 — Preflight (gate, do this FIRST)

Load skill first: codex-flow:preflight (health gate, resume check, workspace baseline) — it carries the detailed checklist for the steps below.

Call mcp__codex__codex_health before anything else:

  • Tool call fails / server missing → the MCP server is not set up. Tell the user to follow the install steps in the codex-mcp README (or run node scripts/doctor.mjs in the codex-mcp repo), then offer the Executor fallback (section below): fix Codex and re-check, or continue with Claude as executor. Never continue silently.
  • loggedIn: false → tell the user to run codex login in their terminal (ChatGPT Plus/Pro/Team, or set OPENAI_API_KEY), then offer the Executor fallback: re-check after login, or continue with Claude as executor. Do not interview, plan, or execute anything until either a re-check shows loggedIn: true or the user has explicitly chosen the fallback.
  • loggedIn: true → report the Codex version, keep executor: codex, and continue.

Exception: a failed health check or missing login does NOT block the analysis lane of the Fast-path gate below — that lane needs no Codex session and no fallback decision. Tell the user about the health failure, then proceed in the analysis lane; the small-change lane and the full flow require either loggedIn: true or an explicit Executor-fallback choice.

Resume check — if .codex-flow/STATE.md exists, treat it as an interrupted run and offer resume or restart, even when PLAN.md or TASKS.md has not been created yet. STATE.md is the resume authority: skip only phases whose approvals STATE.md records, and enter the first unapproved phase. Run node "${CLAUDE_PLUGIN_ROOT}/scripts/flow-state.mjs" check first: when it reports ONLY missing keys on a legacy file, add them with set (currentTask -, taskStage idle, wave -) and continue; any other violation is surfaced to the user before routing. Then route from STATE.md's recorded phase: for phase: execution, enter Phase 4 at the first task not marked done — but first route by taskStage, regardless of currentTask (currentTask names the task in sequential mode and is - with wave set in parallel mode): reviewing → resume Phase 5 for that task; launching/executing → run the in-progress reconciliation first; handoff → finish Phase 5 step 7 (or the wave's Step 3.8 handoff); merge-conflict → surface it and STOP; idle → next pending task; for phase: review, resume Phase 5 completion work. When all tasks are done but phase is not complete, resume Phase 5 for the final dual review, requirement ID-walk, improvement gate, cost/report delivery gates, and completion write instead of concluding there is nothing to do.

Read the full file on GitHub · 622 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +100 lines 6efde25735c0
  2. 4d ago First seen · 522 lines · 24 tokens per session scan A f63f197d6200

Subscribe to this mod's changes

codex-flow is a command published in the GitHub repository anhnguyen0905/codex-mcp (3 stars, last pushed 2d ago), licensed MIT. It adds 24 tokens to every session and 13,497 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.