Claude Code OpenAI Codex Migration 2026

OpenAI Codex Can Now Import Your Claude Code Setup (2026)

The Prompt Shelf ·

Codex CLI’s /import command has quietly grown from “grab your Claude Code settings and session history” into something closer to a full configuration migration tool. With v0.145.0, released July 21, 2026, /import expanded to cover six migration surfaces from both Cursor and Claude Code in one pass: settings, MCP servers, plugins, sessions, commands, and — new in this release — project-scoped memories.

If you’ve built up a real CLAUDE.md, a folder of skills, a few hooks, and a handful of MCP servers, and you’re curious whether Codex can just… take all of it, the honest answer is: mostly, with three specific gaps worth knowing about before you rely on it.

This article verifies what /import actually does against the v0.145.0 release notes and current Codex documentation, not against marketing copy. Where a claim is about Codex’s internals rather than something we tested directly, it’s marked as such.

How to run it

/import is a TUI slash command, not a CLI flag — it only runs inside an interactive Codex session, not through codex exec or the app-server daemon. From Settings, choose “Import other agent setup.” Codex scans your machine for Claude Code configuration — skills, hooks, MCP servers, subagents, instruction files, and roughly 30 days of session history — and migrates what it can automatically.

There’s no /export in the other direction. This is a one-way door: import into Codex, not out of it. If you want to keep Claude Code as your daily driver and just try Codex, don’t run /import expecting a two-way sync — run both tools side by side against the same repo instead.

What actually transfers

Claude Code configCodex CLI equivalentTransfers?
CLAUDE.md memoryAGENTS.mdYes
MCP servers (.mcp.json)[mcp_servers] in config.tomlYes, JSON → TOML
Skills (.claude/skills/)Agent Skills conventionYes
Slash commands / reusable promptsCodex custom promptsYes
Subagents (Markdown frontmatter)Individual TOML filesYes, one file per subagent
settings.jsonconfig.toml + profilesYes, reshaped into TOML
Hooks (PreToolUse, etc.)Codex hooksYes, hook points still fire
Custom model endpointsmodel_providersYes

That’s a genuinely wide surface. CLAUDE.md becoming AGENTS.md is the cleanest conversion — both are plain Markdown instruction files, so the content mostly carries over unchanged. Skills and subagents survive the format change (Markdown → TOML for subagents) with their behavior intact, which is the part most likely to save real setup time if you’re testing Codex against a codebase you’ve already invested weeks of Claude Code configuration into.

What doesn’t — and why it matters more than the table above suggests

Three gaps don’t show up until you actually rely on them:

Permissions don’t map cleanly. Claude Code’s permission model is allow/deny/ask rules over specific tool-and-parameter combinations. Codex’s sandbox model is built around tiers, not the same rule shape. The migration reshapes what it can, but a nontrivial permissions setup — anything more than “allow file edits, deny destructive git commands” — needs manual re-authoring, not a straight port. If your team’s Claude Code permissions encode actual security intent (blocking specific destructive commands, scoping specific MCP tools to specific agents), verify the imported Codex config actually enforces the same boundaries before you trust it in CI.

There’s no ConfigChange hook equivalent. If any part of your Claude Code hook setup reacts to settings or config changes mid-session, that trigger point doesn’t exist in Codex. It’s silently dropped, not converted to something adjacent — worth grepping your .claude/hooks/ for before you assume full parity.

Output styles have no equivalent either. Same story — dropped, not reshaped.

And the actual dead end: vanilla Codex is OpenAI-model-only. There’s no built-in path to keep using Claude models once you’ve migrated. The documented workaround is registering an OpenAI-compatible gateway as a custom model_providers entry and pointing it at Claude — which works, but it’s an extra piece of infrastructure you now maintain, not something /import sets up for you. If the reason you’re on Claude Code in the first place is Claude’s models specifically, migrating your config doesn’t migrate your reason for being there.

The permissions gap deserves a slower read

It’s worth being specific about why “reshapes: allowlist → sandbox tiers” is the line to actually stop and check, rather than skim past.

Claude Code’s Tool(param:value) deny/ask rules let you write something like “deny Bash(rm -rf:*), ask before any push to main” — narrow, tool-and-argument-specific. Codex’s sandbox tiers are coarser: broader buckets of what’s allowed at a given trust level, not per-argument rules. A migration tool converting between these two models has to make judgment calls about which tier best approximates a specific rule, and there’s no guarantee “best approximates” means “enforces the same boundary.”

Practically: after running /import, don’t assume parity. Pick the two or three permission rules you’d be most upset to lose (destructive command blocks are the obvious ones), and deliberately try to trigger them in the migrated Codex config before you use it anywhere that matters.

Should you actually migrate, or just try it?

Given the permissions gap and the model dead-end, migrating wholesale is a bigger commitment than the one-click framing suggests. A more honest read of what /import is good for:

  • Fast onboarding for a side-by-side trial — you get a working Codex setup in minutes instead of hand-writing AGENTS.md and re-porting skills from scratch, which is genuinely useful for evaluating whether Codex fits a specific project.
  • Not a same-day cutover for any setup where your Claude Code permissions or hooks are load-bearing. Budget time to verify parity before you point CI or a team at the imported config.
  • Not a reason to migrate if Claude models are the actual point — you’re adding a gateway dependency to keep using them, which undercuts a chunk of the simplicity /import otherwise buys you.

Dual-running both tools against the same repo for a couple of weeks — using /import to bootstrap the Codex side rather than starting from zero — is the lower-risk path if you’re genuinely comparing them rather than already decided.


Verify Parity Before You Trust a Migrated Setup

If you do migrate permissions or hooks and want to confirm the new config actually behaves the way the old one did, treat it like any pre-cutover QA pass. BugHerd lets a reviewer pin issues directly on a staging environment while you run the migrated setup through its paces — useful for catching the “it looks configured correctly but doesn’t actually block what it should” failures that a config diff alone won’t show you.


FAQ

Q: Does Codex’s /import work from the command line, or only interactively? Only interactively. It’s a TUI slash command available inside a local Codex session — it doesn’t run through codex exec or an app-server daemon connection, and remote sessions are excluded.

Q: Can I import into Codex and then export back to Claude Code later? No. There’s no /export command as of v0.145.0. Migration is one-way, into Codex.

Q: Will my Claude Code permission rules work the same way after import? Not automatically. Claude Code’s per-tool, per-argument allow/deny/ask rules get reshaped into Codex’s coarser sandbox tiers, which can under- or over-permit compared to your original setup. Verify your most important rules manually after importing.

Q: Can I keep using Claude models after migrating to Codex? Not out of the box — vanilla Codex only supports OpenAI models. You’d need to register an OpenAI-compatible gateway as a custom model_providers entry pointing at Claude, which is extra infrastructure /import doesn’t set up for you.

Q: What happens to my Claude Code hooks after import? Most hook points (like PreToolUse) still fire after conversion. The exception is any hook tied to Claude Code’s ConfigChange event, which has no Codex equivalent and is dropped rather than converted.

Q: Do project-scoped memories transfer? Yes — this was the specific addition in v0.145.0. Project-scoped memories migrate into Codex’s own memory store, preserving what the agent has learned about your codebase, not just static instruction files.

Related Articles

Explore the collection

Browse all AI coding rules — CLAUDE.md, .cursorrules, AGENTS.md, and more.

Browse Rules