---
title: "Cursor to Codex: import your setup and recent chats, then check the rules that don't map"
description: "Codex /import brings Cursor setup and recent chats into Codex CLI. What to check after moving from Cursor to Codex, and how to keep .cursor/rules scoped."
canonical_url: "https://factrove.app/blog/cursor-to-codex/"
author: "Tom"
date: "2026-10-25"
---
# Cursor to Codex: import your setup and recent chats, then check the rules that don't map

Short answer: Codex can import from Cursor directly. Start a local Codex CLI session, type `/import`, choose Cursor, and pick the setup, project files and recent chats to bring over. Instruction files land in `AGENTS.md`. Then check one thing by hand: Cursor's `.cursor/rules/*.mdc` files say when each rule applies, and `AGENTS.md` has no field for that, so a rule that only fired for one folder in Cursor needs a home that keeps it scoped.

The first thing I'd do, in the repo:

From the repository directory, run this in your shell:

```bash
codex --no-daemon
```

Then, at the Codex prompt, enter:

```text
/import
```

Choose **Cursor**, select what you want, and read the list before you continue.

## Before switching

Have both tools installed and signed in. Finish the outgoing agent's current turn and stop it editing. In its working directory, record:

```bash
pwd
git branch --show-current
git status --short
git log -1 --oneline
```

Use that same checkout in the receiving tool. For [another checkout or machine](https://factrove.app/blog/claude-code-to-codex-handoff/#what-carries-over-and-what-doesnt), transfer the intended code changes first—for example, commit reviewed changes on the task branch, push, then fetch and check out that commit on the other side. Transfer raw conversation exports separately. Confirm that the receiving agent can open the exact export path and sees the expected code state before continuing.

## Right now: run /import

Per [OpenAI's import docs](https://learn.chatgpt.com/docs/import), Codex CLI can import from Claude Code or Cursor, and the CLI imports up to 50 chats from the last 30 days. The [CLI slash command docs](https://learn.chatgpt.com/docs/developer-commands?surface=cli) add the limits: run it from a local TUI session, and it isn't 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. If your session is connected to the local daemon, exit that session and relaunch with `codex --no-daemon`. If `/import` is still unavailable, use the `HANDOFF.md` fallback below.

The import docs also say importing doesn't change or delete your existing agent setup, so Cursor keeps working as before. And they list what to review before you rely on it: tool restrictions in imported skills and agents, MCP servers with custom authentication or environment variables, hooks, and prompt templates that depend on arguments or file paths.

Before letting Codex edit, I'd check what an imported chat actually gave it:

```text
From the imported Cursor chat about this task: restate the goal, what's done,
what's half-done and what we decided. Compare that with the current files and
git status, and flag anything the code doesn't match. Don't change any files yet.
```

**If you can't use `/import`**, the fallback is a file. Cursor's [shared transcripts](https://cursor.com/help/ai-features/shared-transcripts) don't get you there. They're on Teams and Enterprise only, not Individual or Pro: Teams can make Team or Public links, and Enterprise gets Team links only by default. They're off with "No Storage" Privacy Mode, and there's a limit of 50 shares a day. The one documented way to continue a shared chat is **Fork to Cursor**, which keeps it in Cursor, so it doesn't hand the chat to Codex. I didn't find a chat export command in the [Cursor CLI slash commands](https://cursor.com/docs/cli/reference/slash-commands). So ask the Cursor agent to write a `HANDOFF.md` before you switch. The template, and the `AGENTS.md` rule that makes the next agent read it, are in [Claude Code to Codex handoff](https://factrove.app/blog/claude-code-to-codex-handoff/); nothing in it is specific to Claude Code.

## What maps and what doesn't

From the [Cursor rules docs](https://cursor.com/docs/rules), [Cursor skills docs](https://cursor.com/docs/skills), the [Codex AGENTS.md docs](https://learn.chatgpt.com/docs/agent-configuration/agents-md) and the [Codex skills docs](https://learn.chatgpt.com/docs/build-skills):

| In your Cursor setup | In Codex |
| --- | --- |
| `AGENTS.md` | Read natively. Codex walks from the project root down to your working directory, takes at most one file per folder, and stops at 32 KiB by default |
| `.cursor/rules/*.mdc` | Not on the list of files Codex reads. The import maps "instruction files" to `AGENTS.md`, and the docs don't say how a rule's `globs` or `alwaysApply` come across, so check the result |
| `CLAUDE.md` (Cursor reads it like `AGENTS.md`) | Only if you add it to `project_doc_fallback_filenames`, and only in a folder with no `AGENTS.override.md` and no `AGENTS.md`. Codex checks the override, then `AGENTS.md`, then fallback names, and takes one file per folder |
| Skills in `.agents/skills/` | Read by both. Cursor loads it as project skills, Codex scans it from your working directory up to the repo root |
| Skills in `.cursor/skills/` | Not read by Codex. The import docs list skills as an imported item but don't name `.cursor/skills/`, so check what arrived before you delete the originals |
| MCP servers, hooks, subagents | Mapped by the import, then reviewed |
| Recent chats | Imported, up to 50 from the last 30 days |

Codex has something called rules too, but they're different: `.rules` files that control which commands Codex can run outside the sandbox, per the [Codex rules docs](https://learn.chatgpt.com/docs/agent-configuration/rules). They're not where your Cursor rules go.

## Scoped rules: turn globs into nested AGENTS.md files

This is the part `/import` can't decide for you. Take a Cursor rule like this:

```markdown
---
description: Billing module conventions
globs: src/billing/**
alwaysApply: false
---
- Money is integer cents. Never floats.
- Every change to src/billing/ needs a test in tests/billing/.
```

Pasted into the root `AGENTS.md`, it applies to every task in the repo. The version that stays scoped in both tools is a nested file, `src/billing/AGENTS.md`, with the two bullet points and no frontmatter. Cursor applies a nested `AGENTS.md` when working with files in that folder or below it. Codex picks it up when it walks down from the root.

One difference to know about: per the Codex docs, that walk goes from the project root to your current working directory. A session started at the repo root reads the root `AGENTS.md` and not `src/billing/AGENTS.md`. If billing rules matter for a task, start Codex in `src/billing`, or put a line in the root file that says "Before editing src/billing/, read src/billing/AGENTS.md." I'd do the second, because it works wherever someone starts.

Rules that were `alwaysApply: true` are the easy case. They go in the root `AGENTS.md`, and Cursor reads that file too. For which file each agent reads on a mixed team, including Claude Code, see [AGENTS.md vs CLAUDE.md](https://factrove.app/blog/agents-md-vs-claude-md/).

| Cursor rule | Suggested Codex destination |
| --- | --- |
| `alwaysApply: true` | Root `AGENTS.md` |
| Globs confined to one directory | Nested `AGENTS.md`, plus the root read instruction shown above |
| Globs spanning separate directories | Shared Markdown file with an explicit conditional read instruction in root `AGENTS.md` |
| Description-based, without globs | A task skill with a precise description |
| Manual-only | A manually invoked skill; preserve manual-only invocation explicitly |

For globs that span separate directories, put this line in the root `AGENTS.md`:

```markdown
Before editing src/billing/ or tests/billing/, read docs/agent-rules/billing.md.
```

A manual-only Cursor rule does not stay manual just because its frontmatter moved. Codex documents invocation policy in `agents/openai.yaml`, inside the skill directory and separate from `SKILL.md`. For a manual-only skill, set:

```yaml
policy:
  allow_implicit_invocation: false
```

With that set to `false`, Codex does not invoke the skill from the prompt on its own. Explicit invocation still works. See [Codex skill metadata](https://learn.chatgpt.com/docs/build-skills#optional-metadata).

After changing instruction files, exit and restart Codex from the intended working directory. Before editing, verify the active instructions with:

```text
List your active instruction sources. Before editing src/billing/, follow
the root instructions for that path. Quote the billing rules and name the
required test directory. Flag conflicting instructions. Do not edit files.
```

If a rule is missing, check the working directory, active override files, the root read instruction, and the instruction-size limit before continuing.

## Skills: move shared ones to .agents/skills

`.agents/skills/` is the one skills folder both tools read. If a skill is used in both, keep it there and you skip having a copy for each tool. Codex doesn't merge two skills with the same `name`, and both can show up in its skill selector, so once Codex and Cursor both load the moved copy, delete the old one.

Going back the other way is easy too: Cursor also loads `.codex/skills/` and `~/.codex/skills/` for compatibility, and Codex's `/export` writes the conversation as Markdown that you can `@` mention in Cursor.

## Plans and reports

Plans and reports carry over when Codex can access the saved file, attachment or approved URL. A plan written as HTML is a better read for people and a heavier one for agents; convert it or keep it in semantic tags, as in [HTML for humans, Markdown for agents](https://factrove.app/blog/html-for-humans-markdown-for-agents/). If some of your plans are Claude Code artifacts instead, the routes are in [how to share a Claude Code artifact with a Codex or Cursor teammate](https://factrove.app/blog/share-claude-code-artifact-with-codex-teammate/). For conversion limits, see [what survives HTML-to-Markdown conversion](https://factrove.app/blog/html-to-markdown-for-llm-what-survives/).

## Related migration guides

- [Claude Code to Cursor](https://factrove.app/blog/claude-code-to-cursor/)
- [Codex to Claude Code](https://factrove.app/blog/codex-to-claude-code/)

## Where Factrove fits

None of the steps above need Factrove. Imported recent chats can include a plan or report written in the conversation. A separately saved artifact still needs a reachable file or URL; importing the chat does not establish that availability. The remaining handoff problem is keeping the current artifact discoverable for everyone who needs it.

That's what Factrove is aimed at. The idea is that each of those gets one ID, a page for the people who reviewed it and Markdown that Codex can read. It's planned and not released, and CLI syntax may change. Today I'd save the plan into the repo before you switch.

---

*Factrove is not available yet; CLI and file formats aren't final. Read the [planned artifact workflow](https://factrove.app/#how), [join the waitlist](https://factrove.app/#access), or [follow @thetomweiss on X](https://x.com/thetomweiss) for build notes.*
