Cindy Zhu.
Free guides
Building with AI Claude + Codex

How to hand your Claude Code work to Codex when you run out

Hey, it's Cindy ๐ŸŒฑ Here are the steps to hand unfinished Claude Code work straight to Codex from the same folder, plus how to give both the same rules.
btw the waitlist for AI System Club is now open! If you're keen on using AI to automate your content, video editing, job search, business or build AI agents, feel free to sign up (only if you want to hehe). Ps. the waitlist gets first dibs:)
the big idea

The secret is your folders

A regular AI chat keeps everything inside that one window. Close it or switch apps and the context is gone.

Coding agents like Claude Code and Codex are different: they work on the real files on your computer. So if a project lives in its own folder, both tools can open that same folder and see the exact same work. Nothing needs to be copied across.

๐Ÿ’ก Claude Code reads and edits the files in the folder you open it in, and saves each session on your computer so you can come back to it.
๐Ÿ‘ฉโ€๐Ÿ’ป Codex (OpenAI's coding agent) does the same thing in the same folder, so it can read your files and that saved Claude session too.

before you start

What you need

  • Claude Code, in the terminal or the Code tab of the Claude desktop app (install guide).
  • Codex, as the Codex CLI or the Codex app. It comes with ChatGPT plans, including Free and Go for lighter tasks (Codex plans, Codex CLI).
  • One folder per project, somewhere easy to find, like your Desktop.

the steps

Hand the work over in 4 steps

  1. Keep each project in its own folder. For example Desktop/my-landing-page. Always open Claude Code inside that folder, either by choosing it in the desktop app or by running cd ~/Desktop/my-landing-page and then claude in the terminal.
  2. When Claude runs out, open Codex in the same folder. In the Codex app, pick the same project folder. In the terminal, run cd ~/Desktop/my-landing-page and then codex. Same folder is the whole trick.
  3. Ask Codex to find your last Claude Code session. Paste the prompt below. Claude Code keeps your session transcripts on your computer, so Codex can read the latest one and tell you where you left off. If Codex asks permission to read a file outside the project folder, say yes.
  4. Check its summary, then let it carry on. Compare what it says with what you remember. If it matches, ask it to do the next unfinished step.
๐Ÿ‘ฉโ€๐Ÿ’ป paste this into Codex
Find my last Claude Code session for this folder and tell me where we left off.

Claude Code saves its session transcripts as .jsonl files in ~/.claude/projects/, in a subfolder named after this project's path. Open the most recent one for this folder and read it.

Then tell me:
1. What we were building and why.
2. The last thing that was actually done (files changed, commands run).
3. What is still unfinished or broken.
4. The single next step you would take.

Don't change any files yet. Wait for me to say go.
Going the other way works too. Codex saves its own sessions in ~/.codex/sessions. When Codex runs out, open Claude Code in the same folder and ask it to read your latest Codex session from there.

one brain

Make them follow the same rules

Claude Code reads a file called CLAUDE.md in your project folder. Codex reads AGENTS.md. These are where your instructions live: how you like things named, what not to touch, how to test. Put the same instructions in both and the two models work like one brain.

The easiest way to keep them in sync is one shared file:

  1. Write your rules once in AGENTS.md. Codex reads it automatically (Codex AGENTS.md docs).
  2. Point CLAUDE.md at it. Make the first line of your CLAUDE.md say @AGENTS.md. Claude Code then loads the shared file, and you can add any Claude-only notes underneath (Claude Code memory docs).
๐Ÿ”— paste this into Claude Code
I want Claude Code and Codex to follow the same instructions in this project.

1. Read my current CLAUDE.md (if there is one) and any notes you have about how I work in this folder.
2. Move every project rule that isn't Claude-specific into a new AGENTS.md in this folder: naming, folder layout, what never to touch, how to test, and how I like updates.
3. Replace the top of CLAUDE.md with the line @AGENTS.md so you load the shared file, and keep only Claude-specific notes below it.
4. Show me both files before you save them.

level up

Leave a handoff note before you run out

When you can see you're close to your limit, ask Claude to write a short handoff file. Then whichever model opens the folder next has a clean summary instead of a long transcript.

๐Ÿ“ the handoff note
I'm about to run out of usage. Write a file called HANDOFF.md in this folder that another AI coding agent could pick up from.

Include: what we're building, what's done, what's half done (with file names), any errors we hit and what we tried, the exact next 3 steps, and anything I've told you not to change.

Keep it short and specific. Overwrite the old HANDOFF.md if there is one.

if it doesn't work

Quick fixes

Codex can't find the session Check you opened Codex in the exact same folder you used for Claude Code. Each folder gets its own session history.
The session is gone Claude Code keeps terminal session transcripts for 30 days by default, and sessions from the Claude desktop app are kept longer (source).
It was a normal Claude chat Chats on claude.ai aren't saved on your computer, so there's no session file. This works for Claude Code sessions.
Codex ignores your rules Make sure the file is named exactly AGENTS.md and sits in the project folder, then start a fresh Codex session so it reloads.
the waitlist is now open

AI System Club is launching soon

Build AI systems with me through recorded lessons you can follow at your own pace. Join the waitlist for first access and the founding price.

btw this list gets first dibs
the moment doors open :)