How do I switch from Cursor to Codex without losing my rules and context?
Open Codex in the same folder and bring your Cursor setup with it. In a local Codex CLI session,
type /import and choose Cursor: Codex brings over the setup, project files and recent
chats you select, and Cursor's instruction files land in AGENTS.md, which both tools
read. Importing does not change your Cursor setup. Then check the diff and start the first Codex
task with a short note. With BuildGist, the card in the new Codex chat offers Cursor's task, and
Continue carries it.
BuildGist is a Mac app for Claude Code, Cursor and Codex. Download for Mac.
Three things to move
- Rules: how the project is built, tested and styled.
- The task: what you asked for, what is done, what failed.
- The state of the files: already in the folder. Codex reads it.
1. Look at what Cursor changed
git status
git diff --stat
Cursor's checkpoints stay in Cursor, so if you want a point to come back to, commit or stash
before Codex starts. Inside Codex, /diff shows the Git diff, untracked files
included. Cursor's own review tools are in
how to review Cursor agent changes.
2. Import your Cursor setup
Start a local Codex CLI session in the project and type /import. Choose Cursor,
then select the setup, project files and recent chats you want. Codex imports up to 50 chats from
the last 30 days. /import is not available while a task is running, in a remote
session, or while connected to the local app-server daemon. The ChatGPT desktop app has the same
import under Settings → Import.
What arrives where, per OpenAI's import documentation:
- Instruction files become
AGENTS.md. - Skills, plugins and slash commands become Codex skills and plugins.
- MCP server configuration becomes Codex MCP configuration, and hooks become Codex hooks.
- Chats from the last 30 days become ChatGPT chats.
Review the result before you rely on it: tool permissions in imported skills, MCP servers that need you to sign in again, and prompt templates that use arguments or file paths.
3. Or move the rules by hand
Cursor reads .mdc files in .cursor/rules, each with
description, globs and alwaysApply at the top, and plain
AGENTS.md files at the root and in subfolders. Codex reads AGENTS.md.
The simplest shared setup:
AGENTS.md the rules every agent follows (both tools read it)
.cursor/rules/ only rules that use Cursor's globs or descriptions
If the project has no instructions yet, /init in Codex writes an
AGENTS.md to start from. Which coding agents
read AGENTS.md covers the other tools.
4. Write the note
Task: (what you asked Cursor for)
Done: (what is finished)
Not done: (what is left)
Ruled out: (what failed, and why)
Next step: (the first thing to do)
You can ask Cursor's agent to draft it before you leave. Check it against the diff, because it records what the agent believes it did. Paste it as your first message in Codex and ask for the plan before any edit.
Or choose Continue
Start a new Codex chat in the same project and a BuildGist card at the bottom right offers the Cursor task, if it was active in the last 12 hours. Continue starts the chat with that task's context, and Start fresh hands nothing over. The context is your own words from the task, with a short summary of the last run's files when they are unchanged. Codex needs you to approve BuildGist once, in Codex; BuildGist shows the steps. BuildGist also explains each meaningful run in plain English, so you can read what Cursor did before Codex builds on it.
Going from Codex back to Cursor
Cursor reads the same AGENTS.md, so the rules come with you. In Codex, type
/export session.md to save the conversation as Markdown, and give Cursor the parts
that matter in a short note. With BuildGist, start a new chat in Cursor and choose Continue on the
card. In Cursor the handoff is best effort: if the new chat does not show the task, paste the
note.
Questions
Can Codex import my Cursor chats?
Yes. In a local Codex CLI session, type /import and choose Cursor. It imports up to 50 chats from the last 30 days, along with the setup and project files you select. The ChatGPT desktop app has the same import under Settings, Import.
Does Codex read .cursor/rules?
Codex reads AGENTS.md. The /import command brings Cursor's instruction files into AGENTS.md, or you can move shared rules there yourself, since Cursor reads AGENTS.md too.
How do I switch from Codex to Cursor?
Open Cursor in the same folder: it reads the same AGENTS.md. Save the Codex conversation with /export session.md and start Cursor with a short note, or choose Continue on the BuildGist card in a new Cursor chat.
Does importing change my Cursor setup?
No. OpenAI's documentation says importing does not change or delete your existing agent setup.
Sources
- Import from another agent and Codex developer commands (/import, /init, /diff, /export), checked October 27, 2026.
- Cursor rules (project rules and AGENTS.md), checked October 27, 2026.
What you need
- A Mac with Apple silicon and macOS 12 or later.
- Claude Code, Cursor or Codex.
- A Git project. No commit, push, remote or GitHub repository is needed.
- A GitHub account, to sign in. BuildGist does not access your GitHub repositories.
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
- What did Claude Code change?
- Switch from Claude Code to Codex
- Understand code an agent wrote
- Hand off Claude Code to Cursor
- Review what Codex changed
- You’ve hit your session limit in Claude Code
- You’ve hit your usage limit in Codex
- Keep context across agents
- Review AI code before merging
- BuildGist or the git diff
- Claude Code session history
- Undo Claude Code changes
- BuildGist vs CLAUDE.md, AGENTS.md and HANDOFF.md
- Keep context from Claude Code to Cursor
- Resume an agent session in another tool
- BuildGist vs Conductor
- Codex context window full
- Undo Codex changes
- Cursor usage limit reached
- Review Cursor agent changes
- Codex session history location
- Your conversation is too long in Cursor
- One default coding agent, or two?
- Tools that summarize agent sessions
- Switch from Codex to Claude Code
- Move from Cursor to Claude Code
- Switch from GitHub Copilot to Claude Code
- Move from Windsurf to Cursor
- Switch from Gemini CLI to Claude Code
- Coding agent crashed mid-task
- Claude Code lost context after compacting
- What commands did the agent run?
- Turn an agent session into a PR description
- Which coding agents read AGENTS.md?
- Export a Claude Code conversation
Questions: kayvanandre@gmail.com.