Codex has a plan.Put it in a file you can review.

Codex proposes its plan in the chat, where it scrolls away. Ask for it as a file, and you can comment on it line by line and have Codex fix what you marked.

macOS 14 or later. Reading is free; editing and reviews are one payment.

Quick answer

Type /plan in Codex to switch to plan mode, optionally with the request, such as /plan Propose a migration plan for this service. The plan arrives in the chat. Ask Codex to save it as plans/<name>.md and send it to you in DotMD: you comment on the steps, Codex fixes them and waits until you approve. Codex can also review a plan Claude Code wrote.

What /plan does in Codex

The /plan command switches Codex into plan mode. Instead of starting to write code, Codex proposes an execution plan first. You can type the request after the command: /plan Propose a migration plan for this service. The command is not available while Codex is already working on something, so use it at the start of a task.

Why the plan should be a file

In plan mode the plan comes back as a chat message. OpenAI's documentation names no plan file. A chat message is hard to review: it scrolls away, you cannot point at one step, and nobody else can read it.

A file fixes all three. You can comment on a single line, compare it with the version before, commit it, and hand it to another agent. So ask for the plan as a file, in a folder you choose.

The prompt that works

After Codex proposes its plan, or in the same request, say:

Write the plan to plans/<name>.md and send it to me in DotMD for review.

Codex writes the file and calls DotMD's request_review. The file appears under Needs You in the sidebar, and Codex waits. You read the plan rendered, select a step and press ⌥⌘M to comment, then click Send. Codex gets your comments, fixes the plan and sends each comment back. You accept or reopen every fix, and click Approve when it is right.

If Codex goes looking for comments in the project instead of reading them from DotMD, mention DotMD in the request or add a line to AGENTS.md: see CLAUDE.md and AGENTS.md.

Connect Codex once

Turn the MCP server on in DotMD under Settings → MCP, then add DotMD to ~/.codex/config.toml:

[mcp_servers.dotmd]
url = "http://127.0.0.1:8089/mcp"
tool_timeout_sec = 3600

tool_timeout_sec lets Codex wait while you read. Without it, Codex stops waiting after about a minute. Restart Codex after adding it. The app, the CLI and the IDE extension share one setup; the Codex guide shows the app route too.

Codex reviews Claude Code's plan, and back

Two agents see more than one. Let Claude Code write the plan in plan mode, then ask Codex: "Review plans/migration.md in DotMD and leave comments on the steps you disagree with." Its remarks land on the exact lines under its own name. You keep, edit or delete them, and Claude Code gets only what is left. The same works the other way round.

The agents never talk to each other. Everything goes through the file and its comments, and you decide. More in Agent reviews agent.

What to check in a Codex plan

A plan is cheap to change and an implementation is not, so read it once with a few questions in mind:

  • Is a step missing? Tests, a migration, documentation, a rollback.
  • Is the order right? A step that needs the result of a later step is a mistake in the plan.
  • Is the scope right? Look for files or areas you did not ask Codex to touch.

Put each remark as a comment on the step it is about, and say what to change. Codex sees your comments and the file, nothing else, so "use the existing helper here" beats "this is wrong". DotMD also lists any change you did not ask for under Other changes, so you can see if a fix went further than it should.

Questions about Codex plans

Where does Codex save plans?

In the chat, not in a file. OpenAI's documentation names no plan file. Ask Codex to write the plan to a file you choose.

Can Codex review a plan Claude Code wrote?

Yes. It leaves comments on the lines in DotMD, and Claude Code fixes them.

Does Codex spend tokens while it waits for my review?

Not with tool_timeout_sec set: it waits in one tool call.

Is it free?

Reading the plan in DotMD is free. Reviews with agents need DotMD Reviewer; see pricing.

More questions