A coding project's instructions, reusable skills, and tool connections can outlive the agent that first used them. Codex CLI can import selected Claude Code setup into its own files while leaving the original Claude files in place.

For project setup, the import copies CLAUDE.md to AGENTS.md, copies skills from .claude/skills to .agents/skills, and adds MCP entries to .codex/config.toml. Existing instructions, skill directories, and same-name MCP entries can prevent those items from being offered again; importing is not an overwrite or synchronization operation.

Imported instructions influence future chats, and MCP servers can start local programs or contact external services. Tool permissions, authentication, and hooks need separate review because Claude settings do not all translate directly to Codex. A fresh chat is required to load the imported setup.

An installed, signed-in Codex CLI and an existing Claude Code project are required. The shell commands use a Linux or macOS terminal. On Linux, How to install OpenAI Codex CLI on Linux supplies the installation prerequisites. How to check Codex login status explains the sign-in check. The OpenAI import documentation describes supported items; only detected items appear in the picker.

Steps to import Claude Code setup into Codex CLI:

  1. Select your Claude Code project directory, replacing the path with your project's path.
    $ cd /home/sgreader/example-app
  2. Back up the project to a new sibling directory before importing.

    The backup can contain private project files and MCP credentials. The copy must remain private. The destination must not already exist; replace the backup name if needed.

    $ cp -a . ../example-app.before-codex-import
  3. Back up the active Codex home to a new directory.

    This backup can contain authentication files and must remain private. Its destination must not already exist.

    $ cp -a "${CODEX_HOME:-$HOME/.codex}" "${CODEX_HOME:-$HOME/.codex}.before-claude-import"

    The command follows CODEX_HOME when set and otherwise uses ~/.codex.

    If rollback is needed, close Codex and restore only the affected instruction, skill, and configuration files from these backups. For destinations that did not exist beforehand, remove only the files added by the import. Restoring an older authentication file can invalidate a refreshed sign-in.

  4. Review existing AGENTS.md, .agents/skills, and .codex/config.toml in your project for conflicts.

    A nonempty AGENTS.md or an existing same-name skill directory is preserved. An existing MCP entry with the same name is also retained, while new entries can be added alongside unrelated settings. If an item is missing from the import picker, a destination conflict may explain it; automatic import does not merge competing instructions or skills.
    Related: How to create an AGENTS.md file for Codex

  5. Launch Codex from the project directory.
    $ codex
  6. Approve project trust if the first launch displays Folder access for your reviewed project.

    The Trust and continue option allows project configuration to load and run code automatically, even without a model request. Continue only if you trust the project instructions, hooks, and MCP commands.

    A project without Codex project configuration can open directly at the composer, with no trust prompt yet.

  7. Open the import flow in the idle Codex composer.
    /import

    Codex 0.169.0 can show Import setup directly for a detected project. If a source chooser appears, select Claude Code. No compatible setup was found to import can mean that supported files are absent, the current directory is wrong, or the corresponding destinations already exist.

  8. Open Customize selection from the import summary.

    The c shortcut opens the same picker.

  9. Confirm that the intended project instructions, skills, and MCP servers are checked.

    The picker shows detected names and destinations. Space toggles a category if you want to exclude it. User-level setup and recent chats can also appear; they are separate from the project items. The displayed project-note skill and local-notes MCP server are synthetic examples, so your names and counts will differ.

  10. Return to the import summary with b.

    Review selection also returns to the summary when highlighted.

  11. Start the import with Import selected.

    Importing MCP configuration can enable local programs or network connections in subsequent chats. An unfamiliar command, endpoint, environment variable, or hook needs review before it is enabled.

  12. Confirm that the completion summary reports no failed items. Example output:
    Import finished: 3 imported, 0 failed.
    Results by type:
      Skills: 1 imported, 0 failed
      Instructions: 1 imported, 0 failed
      MCP servers: 1 imported, 0 failed

    The counts depend on the selected setup. A nonzero failed count means that the import is incomplete; the reported item and its destination need attention before continuing. The original Claude files remain available. The startup warning counter is separate from the import result; startup warnings still need review.

  13. Exit the current Codex chat.
    /exit
  14. Read the imported project instructions. Example output:
    $ cat AGENTS.md
    # Example application
    Use plain text output. This project contains synthetic examples only.

    The file should contain your selected Claude project instructions. A missing or unexpected file means that the instruction import needs attention.

  15. Compare the imported instructions with the Claude source.
    $ diff -u CLAUDE.md AGENTS.md

    No output means that the files match. Differences or a missing-file error need review; an existing Codex instruction file may have caused the importer to skip that item.

  16. Start a fresh Codex chat in the same project.
    $ codex
  17. Approve project trust if the fresh launch displays Folder access for your reviewed project.

    The Trust and continue option now loads the imported project configuration, including MCP commands that can start programs or contact services automatically, even without a model request. Continue only if you trust those settings.

    Importing project configuration can introduce this prompt even when the first launch opened without one. The composer appears after approval.

  18. Enter the skills slash command in the new chat.
    /skills
  19. Choose List skills.

    The list includes skills and other available integrations.

  20. Locate your imported skill by typing its name in the picker.

    The displayed project-note entry confirms discovery of the imported skill. No matches means that the name or imported skill directory needs checking. Merely viewing the entry does not submit a model request.

  21. Clear the skill filter with Backspace until the composer is empty.
  22. Run /mcp in the fresh chat to check the imported MCP servers. Example output:
    🔌  MCP Tools
    ##### snipped #####
      • local-notes: connected (0 tools)
    ##### snipped #####

    The synthetic local server shown here deliberately exposes no tools. For your own servers, the expected names and tools should appear with connected status. A missing entry, failed status, or missing expected tools needs investigation; imported credentials or authorization may require separate setup. The MCP entries should also be present in the project's .codex/config.toml.
    Related: How to list Codex MCP servers

Share this guide