BuildGist

How do I switch from Codex to Claude Code without losing context?

Kayvan Zahiri ·

Open Claude Code in the same project folder. Recent versions read the AGENTS.md Codex already uses, so your rules come along with no new file. The task does not: before you leave Codex, check the diff, type /export session.md, and write a five-line note for Claude Code's first message. If you use BuildGist, choose Continue on the card that appears when you start the new Claude Code session, and the task's context goes with you.

BuildGist is a Mac app for Claude Code, Cursor and Codex. Download for Mac.

What carries over and what does not

1. Read what Codex changed

git status
git diff --stat

In Codex, /diff shows the same changes and includes files Git is not tracking yet. Read them before you switch. A half-finished edit is easier to explain while the chat that made it is still open. The order to read in is in how to review what Codex changed.

2. Save the Codex chat

Wait for the current turn to finish, then type:

/export session.md

Codex writes the whole conversation as Markdown. You will rarely paste all of it into Claude Code, since a long transcript fills the new session's context. Keep it so you can copy one error message or one decision when you need it. codex resume also reopens the chat later in Codex itself.

3. Make Claude Code read the same rules

If the project has only AGENTS.md, there is nothing to do. If it also has a CLAUDE.md, Claude Code reads that file instead, so add this line to the top of CLAUDE.md:

@AGENTS.md

Claude Code expands the import, and both agents now follow one set of rules. Type /memory in Claude Code to see which instruction files it loaded.

4. Write the note

Task: (what you asked Codex for, in one line)
Done: (what is finished; the diff has the details)
Not done: (what is left)
Ruled out: (what failed, and why)
Next step: (the one thing to do first)
Codex did the work so far. Read the diff before you edit.

Check each line against git diff --stat. If the note calls something done and the diff does not show it, fix the note first.

5. Start Claude Code

cd your-project
claude

Paste the note as the first message and ask Claude Code to say the next step back before it edits anything. If it reads the plan back wrong, correct it now, while nothing has changed.

Or choose Continue

When you start a new chat in Claude Code in the same project, a BuildGist card at the bottom right of your screen offers the task Codex was working on, if it was active in the last 12 hours. Choose Continue and the new session starts with that task's context, or Start fresh and nothing is handed over. Claude Code takes the context on a new session, not one you are in the middle of. The context is your own words, what you asked for and the constraints you typed, plus, when the files are as that run left them, how many files changed, whether a test failed and up to three paths. It does not include the patch. The reverse trip is in how to switch from Claude Code to Codex.

Questions

Does Claude Code read AGENTS.md?

Yes, from v2.1.277, when there is no CLAUDE.md or CLAUDE.local.md in the working directory or above it. With a CLAUDE.md present, it reads CLAUDE.md, so put @AGENTS.md on its first line.

Can Claude Code open a Codex session?

Not directly. Export the Codex chat with /export session.md and give Claude Code the parts it needs, or a short note. BuildGist's Continue carries the task's context for you.

Can I keep using Codex on the same project?

Yes. Both read the same folder. If they work at the same time, give each its own branch or git worktree so they do not edit the same files.

Sources

What you need

Codex needs you to approve BuildGist once, in Codex. BuildGist shows the steps. Setup is in Getting started.

To explain a run, your computer sends BuildGist what that run needs, and BuildGist passes it to Anthropic. BuildGist does not keep this material. It does not send your whole repository, files the run did not change, or files named like secrets, such as .env files and keys. It keeps the explanation and short cited excerpts of changed code, at most 12 lines each. Secret masking is best-effort. Privacy has the full list.

Every account gets 7 days of BuildGist Pro free, with no card. The 7 days start at your first explanation or Continue handoff. Nobody is charged when the trial ends. After that, BuildGist Pro is $12 per month, plus any applicable tax shown at checkout. See pricing.

Try BuildGist Download for Mac

Apple silicon, macOS 12 or later. United States, 18 or older.

Related

Questions: kayvanandre@gmail.com.