Short answer: in the Codex CLI, type /import and choose Claude Code. Codex brings over your instructions (your CLAUDE.md becomes AGENTS.md), your settings, skills, slash commands, subagents, hooks, MCP servers and up to 50 chats from the last 30 days, and your Claude Code setup stays as it was. In the ChatGPT desktop app, it's Settings → Import. Going the other way, Claude Code has /import codex.
Everything below is from OpenAI's and Anthropic's own documentation, checked on November 6, 2026. (I build Morphy, where a chat can switch from Claude to Codex mid-conversation; it comes up near the end.)
Should you switch at all?
People usually switch for one of three reasons: they keep hitting Claude Code's usage limits, they want OpenAI's models for a kind of work, or they want Codex's cloud tasks and GitHub reviews on a ChatGPT plan they already pay for. Before you move everything, compare the two: Codex vs Claude Code has the prices, limits and benchmarks side by side.
Often the better answer is both. They don't share limits, they can read the same instructions file, and each can import the other's setup in a minute, so you can keep both and use whichever has room.
What comes along
Claude Code → Codex (/import in Codex) | Codex → Claude Code (/import codex in Claude Code) | |
|---|---|---|
| Instructions | CLAUDE.md becomes AGENTS.md, word for word | Codex's instruction files |
| Settings | settings.json becomes config.toml | – |
| Skills | Yes | Yes |
| Slash commands | Become Codex skills | Yes |
| Subagents | Yes | Yes |
| MCP servers | Yes | Yes |
| Hooks | Yes | – |
| Plugins | Yes | – |
| Project memories | Become Codex memories | – |
| Recent chats | Up to 50, from the last 30 days | – |
Neither import changes or deletes the setup you're leaving.
From Claude Code to Codex
In the Codex CLI (Plus and up):
- Go to your project folder and start
codex. - While it's idle, type
/importand choose Claude Code. - Pick what to bring: your setup, your project's files, and the recent chats you want.
- Look over what it imported, then carry on in Codex.
Codex reads your user-level setup from your computer and your project's setup from its folder, and imports at most 50 chats from the last 30 days.
In the ChatGPT desktop app (where the Codex app now lives): open Settings → Import (on some versions, General → Import other agent setup), choose Claude Code, pick the items and continue. The app can also import from Claude Cowork and Cursor, and it can keep imported work in sync with the original, so a skill you change in Claude Code reaches Codex too.
What to check after the import
OpenAI's own list of things to look over:
- Permissions and tool restrictions in imported skills and subagents.
- MCP servers with custom sign-ins, headers, environment variables or transports: you may need to sign in again.
- Hooks, which may behave differently in Codex.
- Prompt templates that use arguments, shell commands or file paths, since Codex fills those in differently.
From Codex to Claude Code
In Claude Code, run:
/import codex
Or from your terminal, claude import codex. It brings Codex's instruction files, MCP servers, commands, subagents and skills into Claude Code. Add --dry-run to see what it would do first, or --yes to skip the picker. The same command imports from Gemini CLI (/import gemini) and Cursor (/import cursor). It isn't available when Claude Code runs on Amazon Bedrock, Google Cloud, Microsoft Foundry or through a Claude apps gateway.
If you start a new project with /init, Claude Code notices a Codex setup by itself and offers to import it.
Keep both, with one set of instructions
- One instructions file. Keep your project's instructions in
AGENTS.md. Codex reads it, and Claude Code reads it too when the project has noCLAUDE.md(a setting makes it read both). - Skills in one place. A skill in
.agents/skills/works in Codex, and Claude Code reads.claude/skills/. See SKILL.md explained for where each agent looks. - Hand work across. OpenAI publishes a plugin that lets Claude Code hand a task to Codex or ask it for a review, so one can check the other's work.
Switching in the middle of a task
The imports move your setup and your chat history, but they don't continue a conversation that's still going: when Claude Code stops at its limit halfway through a change, you start Codex and explain the task again.
In Morphy, a chat can change AI and keep going: open the chat's model button, point at Provider and pick Codex, and your next message brings the conversation along. When a plan's limit runs out, Continue with opens a new chat beside it, on another AI, in the same folder, with the conversation so far. Switch back later, and Claude only gets what happened since. See Switch to another AI.
Questions
How do I move from Claude Code to Codex? In the Codex CLI, type /import and choose Claude Code; in the ChatGPT desktop app, open Settings → Import. Your CLAUDE.md, settings, skills, MCP servers and recent chats come along.
Does Codex read CLAUDE.md? Not directly: it reads AGENTS.md. The import copies your CLAUDE.md into an AGENTS.md, word for word.
Can I bring my Claude Code chats to Codex? Yes: the import brings up to 50 chats from the last 30 days.
Can I go back to Claude Code later? Yes. Your Claude Code setup isn't changed by the import, and /import codex brings anything you built in Codex back.
Should I switch from Claude Code to Codex? If it's for limits, keep both: they don't share limits, and each can import the other. If it's for price or models, compare them first in Codex vs Claude Code.
Related guides
- Codex vs Claude Code: which is better?
- Claude Code usage limits
- Codex usage limits
- How to install and use Codex on Windows
References
- OpenAI: import from another agent, AGENTS.md, skills
- Anthropic: commands, including
/import, CLAUDE.md and AGENTS.md - Morphy: Switch to another AI




