plan-codex

A deprecated planning command in which Claude creates a coding plan and Codex reviews it in repeated approval rounds.

In plain words
What is it for?
Planning software changes without modifying production code during the planning command.
Why use it?
It separates plan creation from review and prevents work from moving forward before the current phase is checked.

Command

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/ching-kuo/claude-codex/plan-codex
Clone the repo
git clone --depth 1 https://github.com/ching-kuo/claude-codex
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 717 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.00013 $0.00717
Opus 5 $0.00006 $0.00358
Sonnet 5 $0.00003 $0.00143
Haiku 4.5 $0.00001 $0.00072

Measured 2d ago against content hash d77c3f513959, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

plan-codex 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 2d ago.

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.

commands/plan-codex.md · 74 lines

How it starts

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

Deprecated: This command has been converted to a skill (/plan-codex). The skill version is recommended for new usage and supports eval-based testing. This command is retained for backward compatibility (model pinning, tool restrictions).

Plan-Codex — Claude Plans, Codex Audits

$ARGUMENTS


Core Protocols

  • Code Sovereignty: Codex has zero filesystem write access during planning — all file operations by Claude only
  • Stop-Loss: Do not proceed to next phase until current phase output is validated
  • Language: Use English when calling tools/models; communicate with user in their language
  • Planning Only: Never modify production code during this command

Execution Workflow

Phase 1: Plan Creation

Launch a Task agent (subagent_type: "Plan") with the task description. The Plan agent will research the codebase and return a structured implementation plan.

If requirements are ambiguous before launching the planner, ask clarifying questions first.

Save the returned plan to .claude/plan/<feature-name>.md.

Phase 2: Codex Audit Loop (max 3 iterations)

Read ~/.claude/prompts/codex/analyzer.md and inject as developer-instructions.

Call mcp__codex__codex (iteration 1):

  • prompt: "Read the plan file at .claude/plan/<feature-name>.md and audit it for correctness, completeness, security, and edge cases. Reply APPROVED if solid, or list specific issues to fix."
  • sandbox: "read-only"
  • approval-policy: "never"
  • developer-instructions: {content of ~/.claude/prompts/codex/analyzer.md} + "\nBe concise. Output result only, no reasoning process."

Save the returned threadId.

Parse response:

  • Contains "APPROVED" → update .claude/plan/<feature-name>.md with final version, go to Phase 3
  • Contains issues → address every issue, revise plan, update .claude/plan/<feature-name>.md

Call mcp__codex__codex-reply (iterations 2-3):

  • threadId: {saved threadId}
  • prompt: "The plan has been revised to address your feedback. Re-read the plan file at .claude/plan/<feature-name>.md and audit it again for correctness, completeness, security, and edge cases. Reply APPROVED if solid, or list specific issues to fix."

Read the full file on GitHub · 74 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. 2d ago First seen · 74 lines · 13 tokens per session scan A d77c3f513959

Subscribe to this mod's changes

plan-codex is a command published in the GitHub repository ching-kuo/claude-codex (23 stars, last pushed 5mo ago), licensed MIT. It adds 13 tokens to every session and 717 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-30.