plan-with-codex

plan-with-codex is a command for Claude Code from closedloop-ai/claude-plugins. It costs 10 tokens per session (3,941 once invoked), scanned A, original, Apache-2.0.

A command that repeatedly refines an implementation plan through a discussion between Claude and Codex. Codex is another coding agent used here to review the plan.

In plain words
What is it for?
Use it to create a plan, send it to Codex for review, and coordinate revisions across multiple rounds.
Why use it?
It adds an independent review loop so the plan can be revised until it is approved or the allowed rounds end.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions subagents; names the TodoWrite tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code plugin — 13 skills, 6 commands, 23 agents, 7 hooks shipped together

Good fit Use it to create a plan, send it to Codex for review, and coordinate revisions across multiple rounds.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add closedloop-ai/claude-plugins
Claude Code
/plugin install code

Made for: Claude Code.

Or install code, the plugin that ships this one along with the rest of its 13 skills, 6 commands, 23 agents, 7 hooks.

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 plan-with-codex

README.md
[![agentmods](https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/plan-with-codex/github.svg)](https://agentmods.dev/commands/closedloop-ai/claude-plugins/plan-with-codex)
Your own site
<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/plan-with-codex"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/plan-with-codex/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plan-with-codex

Your own site · 80×15
<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/plan-with-codex"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/plan-with-codex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,941 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00010 $0.03941
Opus 5.5 $0.00004 $0.01576
Sonnet 5.5 $0.00002 $0.00788
Haiku 4.5 $0.00001 $0.00394

Measured 1mo ago against content hash bd27d69e3f98, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

plan-with-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 1mo 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.

plugins/code/commands/plan-with-codex.md · 305 lines

How it starts

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

Debate Loop -- Claude + Codex Plan Refinement

You orchestrate iterative plan refinement: Claude (via code:plan-agent) creates a plan, Codex reviews it, you coordinate revisions until Codex approves or max rounds are reached.

Plan-Agent -- Initial Launch

First plan-agent call in a session, or fallback when no agent_id is in memory. Vary only description and prompt:

Agent(
  subagent_type="code:plan-agent",
  name="plan-agent",
  mode="acceptEdits",
  run_in_background=false,
  description="<DESCRIPTION>",
  prompt="<PROMPT>"
)

Capture the returned agent_id from the Agent tool's result line (format: agentId: <id>) and reuse it for every subsequent plan-agent interaction in this session.

Plan-Agent -- Continuation (preferred after initial launch)

For every plan-agent interaction after the initial launch, continue the same agent via SendMessage against the stored agent_id. Completed agents auto-resume from transcript in the background with full prior context intact -- this preserves the plan-agent's own memory of what it changed in earlier rounds:

Read the full file on GitHub · 305 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. 1mo ago First seen · 305 lines · 10 tokens per session scan A bd27d69e3f98

Subscribe to this mod's changes

plan-with-codex is a command published in the GitHub repository closedloop-ai/claude-plugins (122 stars, last pushed today), licensed Apache-2.0. It adds 10 tokens to every session and 3,941 once invoked, about $0.0000 per session on Opus 5.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-09-07.