BlogCoding agentsclaude code ยท codex ยท agents md ยท plans

Handing work from Claude Code to Codex without losing the plan

Codex cannot see Claude Code's session or its plans folder. Three steps put the plan where both read it, and the same steps bring the work back.

Prashant Shaw

Founder, Sumibako

4 min read

It is Thursday afternoon, Claude Code is two thirds of the way through a refactor, and the weekly limit arrives like a closing bell. Codex is sitting right there with its own allowance. You open it in the same folder, type "carry on", and it asks, very politely, what you would like it to carry on with.

Codex cannot see Claude Code's conversation. It does not know about the plan you approved this morning, the approach you rejected, or the test that is failing on purpose. The code is shared; the thinking is not. This guide is how to hand the thinking over too, in a way that also works in the other direction, because next Thursday it will be Codex that runs out.

Everything about both tools was checked against Anthropic's and OpenAI's documentation on 23 November 2026. I make Sumibako, which has a part in the last section, and I will flag it there.

The handoff in four steps: Claude Code's plan is moved from its home folder into the repository, AGENTS.md points at it, Codex reads AGENTS.md before any work, and Codex starts in plan mode

๐Ÿงณ What each agent can see when it starts

Codex reads instructions from files called AGENTS.md. Its guide says it reads them "before doing any work", starting with a global one in ~/.codex and then the ones in your repository, nearest folder last. That file is your handoff's front door.

Claude Code reads CLAUDE.md, and these days AGENTS.md too, with a catch the memory docs spell out: "By default, Claude reads AGENTS.md only when you have no CLAUDE.md in your working directory or above it." If your repository has both, Claude Code reads only CLAUDE.md unless you import the other one or change the setting. I compared the three kinds of instruction file at length in CLAUDE.md vs AGENTS.md vs skills.

The plan is the problem. Claude Code's plan mode writes plans to ~/.claude/plans by default: your home folder, not the repository. Codex will never look there, and Claude Code deletes old plan files after 30 days anyway.

๐Ÿ“ Step 1: put the plan where both can read it

Tell Claude Code to keep plans in the project. One line in .claude/settings.json, using the plansDirectory setting:

json
{ "plansDirectory": "docs/plans" }

A plan on its own is not quite a handoff, though. It says what was intended, not what happened. Before the limit hits (or the moment it does, if you have a little left), ask Claude Code to add a short handoff section to the plan file:

markdown
## Handoff, 27 Nov
- Done: steps 1 to 4. The migration runs; the old table is still read.
- Next: step 5, switch reads to the new table behind the flag.
- Decided: no dual writes. We tried it, it doubled the lag.
- Careful: test_backfill fails on purpose until step 6.
- Check with: npm test -- billing

The "Decided" line is the one that saves you. Without it, the next agent rediscovers the approach you already rejected, with great enthusiasm.

๐Ÿ”— Step 2: point AGENTS.md at it

Add a few lines to AGENTS.md at the root of the repository:

markdown
## Work in progress
Before starting, read docs/plans/billing-migration.md.
Continue from its latest "Handoff" section, and add a new
one before you stop.

OpenAI's own cookbook does a grander version of this, with a PLANS.md file that describes how plans are written and kept up to date; it calls those plans "living documents". Three lines do the job for a single handoff.

If your repository also has a CLAUDE.md, put @AGENTS.md on a line of its own in it, so Claude Code reads the same pointer when the work comes back.

โ–ถ๏ธ Step 3: start Codex in plan mode

Rather than telling it to carry on, start Codex with /plan (or Shift+Tab). Its best practices describe what that buys you: "Plan mode lets Codex gather context, ask clarifying questions, and build a stronger plan before implementation." Ask it to read the plan, check it against the code as it is now, and tell you where they disagree before it changes anything. A step marked done in the plan and half done in the code is exactly what this catches, and it is much cheaper to find in a plan than in a diff.

When Codex is done, or out of allowance, it writes the next "Handoff" section, and the same three steps run in reverse.

๐Ÿ—‚๏ธ When the repository is the wrong place

Committing plans works well for a team's shared work. It works less well for the plan for a client, notes you do not want in the history, or a handoff between two machines that do not share a checkout. Here is the part where I declare my interest.

Sumibako keeps those plans in your own vault instead. Run npx sumibako init once and it sets up Claude Code, Codex and Cursor on that machine, asking before each change, and gives the first two a hook: Claude Code files every plan you approve as a private page, and Codex files the plans it proposes, both under the project's name. A new session of either agent can start with a short list of that project's recent pages, so Codex opens already knowing there is a billing plan from this morning and how to read it (npx sumibako open). Nothing is published unless you ask, and init --undo puts every file it changed back as it was.

Whichever way you choose, the rule is the same: the plan lives somewhere both agents read, and whoever stops last writes down what happened. The agents are good at the code. Remembering why is still our job, or at least the job of a file.

For the wider comparison of the two tools, see Claude Code vs Codex, and for why ChatGPT and Codex share one limit, the other half of Thursday's problem.

Drafted by Claude Code from the products' own documentation, read and saved on 23 November 2026, and filed into this vault through the Sumibako CLI.

  • claude-code
  • codex
  • agents-md
  • plans

Prashant Shaw

Founder of Sumibako. Writes here about coding agents, the pages they leave behind, and the plain mechanics of keeping what you think.

Say hello

More on coding agents

All 19 posts โ†’